Commit Graph

15471 Commits

Author SHA1 Message Date
Doug Barton
4b15724254 I mistakenly committed the wrong version of my patch (sorry).
s/O2/O2Micro, as that's how they seem to prefer it, and remove
what is now one blank line too many.
2006-11-24 06:51:49 +00:00
Kip Macy
3d229d50ab remove no longer correct comment above em_read_pcie_cap_reg 2006-11-23 05:48:13 +00:00
Kip Macy
21e3069792 Move magic PCIe workaround constant to header - add appropriate comment
Suggested by: jfvogel
2006-11-23 05:43:39 +00:00
Doug Barton
e3e0cf8246 Add a vendor ID for O2Micro, obtained from
http://www.usb.org/developers/tools

Add a product ID for the Dell TrueMobile 350 Bluetooth USB Adapter
obtained from NetBSD's usbdevs file.
2006-11-23 00:58:40 +00:00
Kip Macy
af088c45e8 Fix TSO support on sun4v
- incorporate csjp's fix for a mishandled endian conversion
- convert PAGE_SIZE to 4096 for PCIe adapter workaround (my page size is not 4k)
- implement em_read_pcie_cap_reg where we set the max read size on pcie to 4k (taken from mxge)

Reviewed by: scottl and jfvogel
2006-11-23 00:52:52 +00:00
Sam Leffler
0a0b5b012d add codes for Atheros USB devices; shuffle one ural code to
avoid conflict

Obtained from:	openbsd
MFC after:	1 month
2006-11-23 00:50:48 +00:00
Andrew Gallatin
a8ebcb1bc0 Fix transposition of width and value arguments to pci_config_write()
when setting up the read request size.

Pointed out by: kmacy
2006-11-22 18:47:24 +00:00
Warner Losh
5128f7357c Fix coherency issue. From submitter:
I have been debugging the usb problems some more. Your were
	right in your assumption (thanks for the pointer) about lack
	of calls to bus_dmamap_sync().  In usbdi.c bus_dmamap_sync()
	does get used for transfers that move data from PC to USB and
	it is used for transfers that move data from USB to PC. But
	someone forgot that control transfers consist of possibly two
	data chunks : the request itself and optionally a buffer of
	data that should be transfered to or from the USB device.  On
	requests to the control endpoint without additional data
	bus_dmamap_sync() didn't get called. For some reason my first
	tests with umass worked (due to enough cache poisening I
	guess).  The attached patch adds a call to bus_dmamap_sync()
	to usbdi.c and now all devices I have tried work out of the
	box.  I have successfully transfered large files using the
	if_axe driver and I have mounted several different umass
	devices.

submitted by: Daan Vreeken
sponsored by: Vitsch Electronics
reviewed by: cognet@
2006-11-22 17:56:36 +00:00
Andrew Gallatin
d91b1b4976 Initialization bugfixes and enhancements:
- Fix bug preventing adoption of running firmware
- Set PCIe max read request size to 4KB
- Read PCIe link width from config space
- Assume aligned completions from the southbridge ports
  of intel E5000 chips
- Use aligned firmware when link width is x4 or less
- Add hw.mxge.force_firmware tunable to allow user to force
  selection of aligned (or unaligned) firmware
2006-11-22 16:33:40 +00:00
Warner Losh
0fdb9239c4 MFp4: Add ixpiic bit-bang driver.
Submitted by: sam@
2006-11-22 06:41:37 +00:00
Warner Losh
64e043166e <blush> copyout on read, not write.
Tweak a comment while I'm here.
2006-11-22 06:03:39 +00:00
Doug Barton
79506f19fb Acknowledge (dearly) departed files 2006-11-21 22:29:06 +00:00
Andrew Gallatin
dc8731d4d2 Added MSI support.
Sponsored by: Myricom Inc.
2006-11-21 15:55:01 +00:00
John-Mark Gurney
b318e84967 don't mark the cksum as invalid here... off is incorrect when we get
here, it's either unset, or it's valid, so we don't need to do anything
different...

Reported by:	Neterion (via rwatson)
2006-11-21 05:46:09 +00:00
Pyun YongHyeon
b61178a956 Fix typo. 2006-11-21 05:41:11 +00:00
Pyun YongHyeon
dc74159da6 Add TSO support.
Tested by:	wilko,  Pieter de Goeje < pieter AT degoeje DOT nl >
2006-11-21 04:40:30 +00:00
Pyun YongHyeon
960fd5b3d0 o Correctly set IFCAP_VLAN_HWCSUM as re(4) can do VLAN tagging/checksum
offloading in hardware.
o Correctly set media header length for VLAN.
2006-11-21 04:23:52 +00:00
Pyun YongHyeon
19ecd2310c Don't set RL_CFG1_FULLDUPLEX bit. The RL_CFG1_FULLDUPLEX bit in
config register 1 is only valid on 8129.
2006-11-21 04:14:44 +00:00
John Baldwin
6daee769f4 Add suspend/resume support. Unlike many other NIC drivers,
bfe_init_locked() wasn't sufficient to bring the chip back to life, it also
required a call to bfe_chip_reset() during resume.

Tested by:	Stepan Zastupov +redchrom at gmail+
MFC after:	1 week
2006-11-20 23:30:07 +00:00
Marius Strobl
61e5f5471e - Make rp(4) 64-bit- and endian-clean as well as work on strict alignment
archs. [1]
- Instead of bus_space_{read,write}*(rman_get_bustag(), rman_get_bushandle())
  use bus_{read,write}*() for efficiency.

Reported by:	Peter Losher [1]
Tested on:	i386, sparc64
MFC after:	2 weeks
2006-11-20 12:59:27 +00:00
Sam Leffler
7ca00fac3a o define transfer method
o attach ds1672 and ad7418, to be cleaned up

MFC after:	1 month
2006-11-19 23:42:32 +00:00
Sam Leffler
10cb662ae4 i2c and clock driver for Dallas Semiconductor DS1672 RTC
MFC after:	1 month
2006-11-19 23:40:58 +00:00
Sam Leffler
6931296a79 i2c driver for Analog Devices AD7418
MFC after:	1 month
2006-11-19 23:39:54 +00:00
Matt Jacob
96dc1a5335 Pointy hat handed to me by Andrew: had msi_enable on as a default. 2006-11-19 23:24:52 +00:00
Matt Jacob
804625ee9c Play it safe and make MSI and MSI-X an option you have to turn on for MPT. 2006-11-19 23:15:42 +00:00
Matt Jacob
21167708e8 If a TMF request fails to start, make sure that we pull it off the
pending list and set the state back to free prior to calling mpt_reset
so we don't panic at a later point.
2006-11-19 23:13:12 +00:00
Christian S.J. Peron
90d4d36094 Implement new ETHER_BPF_MTAP macro. Roll back the various changes
made to accommodate the chip being in promiscuous mode while
offloading VLAN tag processing to the hardware.  We can now
properly handle the absence of VLAN tags from hardware stripping.

Reviewed by:	rwatson, andre
MFC after:	1 month
2006-11-18 23:18:43 +00:00
Scott Long
3c77cee1ba Change the internal API for polled commands. Calling mfi_polled_command
after calling mfi_mapcmd is no longer needed, so long as the MFI_CMD_POLLED
flag is set.  This change eliminates the possibility of a polled command
getting posted twice to the driver.  This is turn fixes panics on shutdown
when INVARIANTS is set.

Sponsored by: Ironport
2006-11-18 07:33:53 +00:00
Matt Jacob
04697f7aa3 Make the SAN login/logout stuff more common between different chipsets
and provied an isp_control entry point so that the outer layers can
do PLOGI/LOGO explicitly. Add MS IOCB support. This completes the cycle
for base support for SMI-S.
2006-11-18 03:53:16 +00:00
Matt Jacob
6301ffe515 Disable code to set max read byte count on the 2400.
It caused a panic in writing the config register on a system. Turn
it off until we take the time to understand it.

Reported by and Testing by: Anton
2006-11-17 17:32:45 +00:00
David E. O'Brien
9ae2249db2 Missed two nits in rev 1.7. 2006-11-17 16:49:40 +00:00
Søren Schmidt
72a426ba26 Deal more generically with the byteswap needed on !littleendian HW.
Account for the odd layout on ARM bigendian HW.
2006-11-17 11:13:47 +00:00
Matt Jacob
52c008534d *smack* - forgot to do i386 compile, so last
commit broke things.
2006-11-17 00:19:55 +00:00
Matt Jacob
757cabc30b Finally fix local command responses to set residual correctly.
This allows us to play nicely on SANs when we have target mode
enabled in f/w but have neither the scsi_targbh enabled or
scsi_targ with a target enabled.
2006-11-16 23:47:16 +00:00
John Baldwin
3bea4efeb1 Look for capabilities in PCI-PCI bridges using the same CAP PTR register
as for type 0 devices.

Submitted by:	grehan
MFC after:	1 week
2006-11-16 17:31:33 +00:00
Ruslan Ermilov
5a66b66324 Replace magic numbers for console bell types with defines. 2006-11-16 12:27:51 +00:00
Scott Long
46222d084a Due to an incorrect macro, it appears that this driver has always been
accidentally truncating off the VLAN tag field in the TX descriptor.  Fix
this by splitting up the vlan_tag and flags fields into separate fields,
and handling them appropriately.

Sponsored by: Ironport
MFC After: 3 days
2006-11-16 06:28:54 +00:00
John Polstra
6e7b2160a4 In bce_start_locked, check the used_tx_bd count rather than the
descriptor's mbuf pointer to see if the transmit ring is full.  The
mbuf pointer is set only in the last descriptor of a
multi-descriptor packet.  By relying on the mbuf pointers of the
earlier descriptors, the driver would sometimes overwrite a
descriptor belonging to a packet that wasn't completed yet.  Also,
tx_chain_prod wasn't updated inside the loop, causing the wrong
descriptor to be checked after the first iteration.  The upshot of
all this was the loss of some transmitted packets at medium to high
packet rates.

In bce_tx_encap, remove a couple of old statements that shuffled
around the tx_mbuf_map pointers.  These now correspond 1-to-1 with
the transmit descriptors, and they are not supposed to be changed.

Correct a couple of inaccurate comments.

MFC after:	1 month
2006-11-16 04:04:07 +00:00
Matt Jacob
eba891af5b After tests on 2 different AMD platforms with several
different cards (SAS, 4Gb FC), MSI seems to work with
the cards.

This was of some concern because some  PCI cards
claim to work with MSI but don't.
2006-11-16 02:40:18 +00:00
Matt Jacob
2cad1d9857 Increase the timeout for some SAN commands.
Only complain about FC Reponse errors if they're nonzero.

Shorten some PortID printouts for local loop.

Add an internal isp_xcmd_t data structure which we'll use for some
CT-Passthru support as part of adding SMI-S.
2006-11-16 00:39:56 +00:00
Matt Jacob
e49f99cd9f minor change to reduce some diff noise 2006-11-16 00:31:46 +00:00
John Birrell
3f970273b1 Add big endian support.
Submitted by:	scottl
Reviewed by:	mjacob
2006-11-15 21:46:36 +00:00
John Birrell
c686bf2237 Get the parent dma tag if one exists. This is required on sun4v. Other
arches will default to NULL if they have no parent.

Reviewed by: mjacob
2006-11-15 21:41:59 +00:00
Matt Jacob
4f914ffd1d Turn off MSI until some testing is done. 2006-11-15 20:18:09 +00:00
John Baldwin
280388afe5 Add MSI support to em(4), bce(4), and mpt(4). For now, we only support
devices that support a maximum of 1 message, and we use that 1 message
instead of the INTx rid 0 IRQ with the same interrupt handler, etc.
2006-11-15 20:04:57 +00:00
Maxim Konovalov
9aab0d96da o Add uark(4), a driver for Arkmicro Technologies ARK3116 based serial
adapters.

Submitted by:	Alex Rodin
Obtained from:	OpenBSD
Reviewed by:	-usb
MFC after:	6 weeks
2006-11-15 09:13:25 +00:00
Rink Springer
597d4fe47d Added yet another extra fxp(4) PCI ID.
PR:		kern/104896
Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>
Reviewed by:	imp (mentor), jfv
Approved by:	imp (mentor)
MFC after:	3 days
2006-11-14 18:54:31 +00:00
John Baldwin
60b9b19721 Fix a couple of comment typos.
Reported by:	ru
2006-11-14 17:54:55 +00:00
Doug Ambrisko
c2be47f25f - Add in FreeBSD native ioctl that models the Linux version.
- Add a translation so the Linux ioctl's don't conflict with
  the FreeBSD definition.
- Assume Linux 32bit emulation on amd64.
This was tested on i386 and amd64 with the 32bit Linux MegaCli.
Eventually we should do a 32bit native FreeBSD translation app.
2006-11-14 16:48:00 +00:00
Matt Jacob
f7c631bcf0 Push things closer to path failover by implementing loop down and
gone device timers and zombie state entries. There are tunables
that can be used to select a number of parameters.

loop_down_limit - how long to wait for loop to come back up before
declaring
all devices dead (default 300 seconds)

gone_device_time- how long to wait for a device that has appeared
to leave the loop or fabric to reappear (default 30 seconds)

Internal tunables include (which should be externalized):

quick_boot_time- how long to wait when booting for loop to come up

change_is_bad- whether or not to accept devices with the same
WWNN/WWPN that reappear at a different PortID as being the 'same'
device.

Keen students of some of the subtle issues here will ask how
one can keep devices from being re-accepted at all (the answer
is to set a gone_device_time to zero- that effectively would
be the same thing).
2006-11-14 08:45:48 +00:00