Commit Graph

8462 Commits

Author SHA1 Message Date
Sam Leffler
45a0c8fe56 fix memory allocation problems and collateral damage:
o create a separate tag for each object allocated with bus_dmamem_alloc so
  the tag's maxsize is setup appropriately; this reduces memory allocation
  for the queue descriptors from 16M to what it should be and also fixes
  memory allocation for public key operands
o release bus dma resources on detach so module usage doesn't leak
o remove public key op disable now that bus dma memory allocation is fixed
o collect attach error handling in one place

Sponsored by:	Vernier Networks
2003-01-06 21:23:06 +00:00
Hidetoshi Shimokawa
17faeefca6 Use device_printf() and s/fc->dev/fc->bdev/. 2003-01-06 08:07:20 +00:00
Hidetoshi Shimokawa
9bfd777adb Fix fc->dev to fc->bdev. 2003-01-06 05:57:48 +00:00
Mike Barcroft
51afc2ad43 Avoid casting pointers to int and using %x to print them.
Noticed by:	alpha tinderbox
2003-01-05 16:23:49 +00:00
Hidetoshi Shimokawa
a423957600 Reduce diff to RELENG_4. 2003-01-05 14:58:45 +00:00
Hidetoshi Shimokawa
bda19384a1 Syntax fix in fwohci_pci_suspend(). 2003-01-05 09:12:47 +00:00
Brian Feldman
a8be3e63ce Fix the duplicate unlock of the pcm read channel in certain cases.
Reviewed by:	cg
2003-01-05 07:32:33 +00:00
Hidetoshi Shimokawa
94b6f028fd - Change definition of fc->maxrec same as fwdev->maxrec.
- 'spec' and 'ver' are attributes of a unit rather than a node.
- Report Phy and Link info separatelly.
- Reorder intialization step in fwohci_reset().
2003-01-05 06:21:30 +00:00
Jake Burkholder
a720ae1bbe Sync with zs.
- Fix some bogosity with mixing unit numbers and channels, which would only
  work for one instance of the device.
- Use a simpler scheme for input and output queueing.
- Use db_alt_break.
2003-01-05 04:07:31 +00:00
Hidetoshi Shimokawa
bce5729a9d - Remove speed_map API because speed_map is obsoleted by 1394a.
- Add definition of OHCI_HCC_BIBIV in fwohcireg.h.
2003-01-04 16:03:50 +00:00
Hidetoshi Shimokawa
7ddbf617b1 - Handle zero sized directory right way.
- Staticize.
2003-01-04 10:32:31 +00:00
Hidetoshi Shimokawa
d6105b602c - Replace printf() with device_printf().
- Separate fc->dev (i.e. fwohci0) and fc->bdev (i.e. firewire0).
- Remove unused firewirebusreg.h.
- Reduce size of descriptor block for asynchronous transmit and
	check the number of descriptor when copying from mbuf.
- Skip mbuf whose length is zero. NFS seems passing such mbuf and
	some chips generates unrecoverable error.
2003-01-04 10:21:11 +00:00
Hidetoshi Shimokawa
9339321d89 - Propagate suspend/resume to child devices.
- Restore pci config registers after resume.
- Reinitialize and start rx buffers after resume.
- Don't reallocate memory in fwohci_db_init() if the dbch is
	already initialized.
- Fix typo.
- Some clean up.
2003-01-04 06:40:57 +00:00
Poul-Henning Kamp
f05f44f0f2 Remove CCDF_SWAP and CCDF_PARITY, they have never been implemented. 2003-01-03 08:57:40 +00:00
Poul-Henning Kamp
e2a3ea1c45 Remove unused second argument from DEV_STRATEGY(). 2003-01-03 05:57:35 +00:00
Poul-Henning Kamp
d616ee081f Remove unused second argument from BIO_STRATEGY() 2003-01-03 05:51:11 +00:00
Jake Burkholder
777cc88b9d - This damnable chip only has 1 status register for both ports, so the bit
positions for the status bits of port a and port b are different.  To
  avoid needing to know which channel the interrupt handler is working on,
  shift the status bits for port a into the port b bit positions, and always
  check the port b status bits.  This fixes using port b, which I neglected
  to test before.
- Remember to update the channel's tty structure from the passed in termios
  in the param routine.
- Minor style.
2003-01-02 19:04:35 +00:00
Warner Losh
3225a9881d Update to correct NetBSD Id 2003-01-02 04:22:44 +00:00
Matt Jacob
76514802bd Make compiles (LINT and/or ISP_TARGET_MODE options) happier by making sure
printf type format args and actual args match.

Reviewed by:	Sam Leffler <sam@errno.com>
2003-01-02 04:21:52 +00:00
Warner Losh
d77b690ff6 Sync to 1.104 of usbdevs 2003-01-02 04:21:38 +00:00
Warner Losh
cb33fc95b9 Add NEODIO TURBOCONNECT (from NetBSD) 2003-01-02 04:21:04 +00:00
Warner Losh
1732632481 MFNetBSD through 1.42 (to be committed in a moment by me).
o Whitespace nits
o NEODIO added
2003-01-02 04:15:55 +00:00
Alexander Kabaev
851d388443 Do not print the value of sc pointer before is has been ininialized. 2003-01-02 02:46:13 +00:00
Alexander Kabaev
64fe778489 Create debug sysctl nodes if USB_DEBUG is defined.
UBSA_DEBUG is inconsistent with other drivers.
2003-01-02 02:38:57 +00:00
Warner Losh
82e10e2428 It appears that the SANYO SCP-4900 needs similar quirks to the
Metricom Ricochet GS modem.  Add them here.

# A new umodem appears to be needed to make the sanyo phone work, but that's
# more extensive and will come after coordination.
2003-01-01 20:21:48 +00:00
Warner Losh
4dac02c8db Sync to usbdevs 1.103 2003-01-01 20:18:58 +00:00
Warner Losh
4cce0eba8d Add Sanyo SCP-4900 phone. It needs quirks. 2003-01-01 20:18:15 +00:00
Warner Losh
f56d03c008 Now that we've 'branched' 5.0, desupport FreeBSD 3.x in this driver. It
appears that NetBSD has already done this in their tree.
2003-01-01 20:15:42 +00:00
Jake Burkholder
75db2b5e27 Add a driver for the Zilog 8530 dual uart found in Ultra 1s and Ultra 2s.
With a 1 byte transmit fifo, 3 byte receive fifo, and wierd multiplexed I/O
designed for a Z80 cpu, this chip redefines suckage.

Based on the openbsd and netbsd drivers.  Only really works as a console,
modem support is not complete since I can't test it.
2003-01-01 19:49:30 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Hidetoshi Shimokawa
d0fd7bc6b5 Experimental support for suspend/resume, not finished yet. 2003-01-01 08:25:32 +00:00
Hidetoshi Shimokawa
6faac3ac96 Reduce debug message. 2003-01-01 08:22:29 +00:00
Hidetoshi Shimokawa
1f2361f8f8 - Retry phy access when the wait-loop count is exhausted.
- Free allocated memory when detaching.
- Detect contigmalloc failure.
2003-01-01 04:23:54 +00:00
Alfred Perlstein
13438f6823 When compiling the kernel do not implicitly include filedesc.h from proc.h,
this was causing filedesc work to be very painful.
In order to make this work split out sigio definitions to thier own header
(sigio.h) which is included from proc.h for the time being.
2003-01-01 01:56:19 +00:00
Hidetoshi Shimokawa
7895313547 Fix and add several device IDs. 2002-12-31 13:43:44 +00:00
Hidetoshi Shimokawa
b018dcd1b8 - Implement primal Configuration ROM parser.
- Support multiple LUNs for SBP-II.
2002-12-31 10:28:49 +00:00
Hidetoshi Shimokawa
e4b13179f6 Improve error checking of phy access and retry when error occurs. 2002-12-31 10:00:36 +00:00
Robert Watson
07ca1fdb84 Use UID_ and GID_ constants for uid and gid arguments to make_dev()
for the raidctl device.

Select a more conservative default for the permissions for /dev/raidctl
since the operations are performed using ioctl() not read() and write().

Submitted by:	kris
Reviewed by:	scottl
2002-12-31 06:13:47 +00:00
Scott Long
1c75404899 Convert the use of MAXBSIZE in the dma tag to more appropriate values.
Use BUS_SPACE_MAXSIZE_32BIT for the parent dma tags, and
(NSEGS - 1) * PAGE_SIZE for the data buffer tags.  FreeBSD/sparc64 is
more strict about checking these values that other arches.
2002-12-31 04:22:36 +00:00
Sam Leffler
ac4f28eb7b MFS 1.6.2.3: fixup statistics; turn off batching by default; add max
aggregation tunable and set it to 1 to minimize latency

Sponsored by:	Vernier Networks
2002-12-30 22:16:45 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Sam Leffler
9967cafc49 Correct mbuf packet header propagation. Previously, packet headers
were sometimes propagated using M_COPY_PKTHDR which actually did
something between a "move" and a  "copy" operation.  This is replaced
by M_MOVE_PKTHDR (which copies the pkthdr contents and "removes" it
from the source mbuf) and m_dup_pkthdr which copies the packet
header contents including any m_tag chain.  This corrects numerous
problems whereby mbuf tags could be lost during packet manipulations.

These changes also introduce arguments to m_tag_copy and m_tag_copy_chain
to specify if the tag copy work should potentially block.  This
introduces an incompatibility with openbsd which we may want to revisit.

Note that move/dup of packet headers does not handle target mbufs
that have a cluster bound to them.  We may want to support this;
for now we watch for it with an assert.

Finally, M_COPYFLAGS was updated to include M_FIRSTFRAG|M_LASTFRAG.

Supported by:	Vernier Networks
Reviewed by:	Robert Watson <rwatson@FreeBSD.org>
2002-12-30 20:22:40 +00:00
Sam Leffler
28788ed563 fix build (make LINT) 2002-12-30 19:45:30 +00:00
Jake Burkholder
591871e5cb Fix compiling without DDB and ALT_BREAK_TO_DEBUGGER.
Submitted by:	marius@alchemy.franken.de
2002-12-30 18:18:22 +00:00
Hidetoshi Shimokawa
e238f68de5 - Add more CSR related definitions (IEEE-1212).
- Fix struct csrtext's spec fields.
- Add prototypes of upcoming configuration ROM related functions.
2002-12-30 09:41:32 +00:00
Doug Ambrisko
6cafe2646a Add support for MPI-350 the mini-pci Cisco Aironet card. This needs more
work.  The interface was gleaned from the Linux driver.  Currently only
one RX & one TX buffer are used.  Firmware support is not tested so for the
MPI-350 so it is disabled.  Signal cache and monitor mode are not supported
yet.  Signal cache is not supported since in encapsulation mode ethernet
frames are returned by the chip.  LAN monitor mode support will be added
shortly.  Thanks to Warner for the MPI-350 card he sent me.

Add support for RSSI map from PR kern/32880 which was incomplete.  Enhanced
with the ability to select the cache mode of raw, dbm or per-cent.

Clean up Signal/Noise/Quality structures and units with help from
Marco Molteni.

Change flash to use a malloc'ed buffer when needed.

PR:		kern/32880
Submitted by:	Douglas S. J. De Couto decouto@pdos.lcs.mit.edu,
		Marco Molteni
MFC:		3 weeks
2002-12-29 19:22:07 +00:00
Poul-Henning Kamp
2b64426519 Remove calls to cdevsw_add(), they are dreprecated on this branch now. 2002-12-28 21:39:04 +00:00
Maxim Sobolev
638d2f4fe8 Add support for IC Book Labs Dreadnought x16 Lite.
Approved by:	re
2002-12-28 15:45:38 +00:00
Robert Watson
2a4689e84a Change ACPI make_dev() calls to use UID_ and GID_ constants rather
than hard-coded uids and gids.

Switch the device to a group of wheel instead of operator.

Narrow down the permissions on the device to require root privilege
to manipulate the system power state.  It may be that we can broaden
access to the device after review of the access control in ACPI.

Submitted by:	kris
Reviewed by:	takawata
2002-12-28 14:58:50 +00:00
Robert Watson
9e9466baf3 Use OPERATOR instead of WHEEL for make_dev(), use 0640 instead of 0644
for disk devices to be consistent with other storage devices.

Submitted by:	kris
Reviewed by:	scottl
2002-12-27 17:52:16 +00:00