Commit Graph
14587 Commits
Author SHA1 Message Date
Doug Ambrisko 4f9f5f3615 MF7: r185034 which brings in new HW support, fix some bugs in the API
for the management ioctl.

Submitted by:	LSI
2009-03-18 20:42:00 +00:00
John Baldwin 1fc330c068 MFC: Don't throw away the upper 32-bits of the HT MSI address window. 2009-03-05 15:50:39 +00:00
Andrew Gallatin f0e8fc4302 MFH r188736 and r188737: Better support for recent Myricom 10GbE NICs 2009-02-24 20:16:52 +00:00
Olivier Houchard 77c2eb50d2 MFC:
r188424 | cognet | 2009-02-09 23:59:22 +0100 (Mon, 09 Feb 2009) | 6 lines

Hmm... "base? base : 0" and "base" should be equivalent.
2009-02-12 15:26:27 +00:00
Giorgos Keramidas 81508d4ce2 MFC 187375 from /head
Add support for CMedia CMI120.

PR:           kern/123640
Approved by:  ariff
2009-02-02 04:53:39 +00:00
Weongyo Jeong ffca60c32d MFC r186919:
fix a typo to set the 48Mbps data rate.

  PR:		kern/130189
  Submitted by:	Paul B. Mahol <onemda_at_gmail.com>
  Reviewed by:	sam
2009-01-31 05:25:14 +00:00
John Baldwin 9fee17d713 MFC: Fix the maximum transfer size for mfi(4) disk devices to not exceed
the maximum number of scatter/gather elements supported in the bus dma tag.
2009-01-21 17:16:03 +00:00
Stanislav Sedov 05a6e3110d - MFC r174660:
Add quirk for the TrendNet TU-S9 adapter, which uses new version of PL2303
  chip (revision 0x400). This allows it to be correctly identified as PL2303X.

PR:		usb/128115
Submitted by:	Borodin Oleg <[email protected]>
2009-01-18 12:59:37 +00:00
Marius Strobl 24dc94b0e4 MFC: r180692
o Fix style(9) bugs and similar nits.
o Merge ncr53c9x.c from NetBSD:
  1.115: fix variable shadowing
  1.118: __inline -> inline
  1.121: fix empty if
2009-01-15 21:23:44 +00:00
Marius Strobl 10ec9682d9 MFC: r184380
Do as the Linux tg3 driver does and enable MSI support also
for the BCM5714 revision A0 when in a multi-port configuration
and unconditionally for the remainder of the class of BCM575X
and beyond chips.
2009-01-15 20:23:44 +00:00
Marius Strobl 7755e96579 MFC: r183281
- Don't read the identifier string from the VPD if there's no chip
  containing an Ethernet address fitted as this is yet another thing
  that fails in that case in order to avoid the one second delay
  until pci_read_vpd_reg() times out.
- Const'ify the bge_devs array.
2009-01-15 20:13:50 +00:00
Marius Strobl 289aad24a2 MFC: r186876
Check the return values of contigmalloc(9) as well as bus_dma(9)
functions and stop attaching of dcons(4) and dcons_crom(4) if
they indicate failure. This fixes a panic seen on sparc64 machines
with no free physical memory in the requested 32-bit region but
still doesn't make dcons(4)/dcons_crom(4) these work.
2009-01-14 22:11:01 +00:00
Marius Strobl 87918b68b2 MFC: r185108
Given that the buffer dcons_crom(4) exposes is used for both input
and output, set BUS_DMA_COHERENT when creating the DMA map used for
loading the buffer. As a side-effect this solves locking issues on
sparc64 when dcons(4) calls bus_dmamap_sync(9) while in an interrupt
filter, which are executed in a critical section, and iommu(4) has
to use a sleep lock when taking advantage of the streaming buffer.

Reported and tested by:	kensmith
Approved by:		simokawa
2009-01-14 21:08:43 +00:00
Rong-En Fan d1262781c3 MFC r186851
- Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel
   module. These files cause manual interaction when building
   ports/audio/aureal-kmod which provides a usable i386-only driver (it requires
   linking against some linux object files distributed by vendor which bankrupted
   back in 2000).

 MFC after:    1 week

PR:           124343
2009-01-14 10:17:35 +00:00
Marius Strobl 875cf4fe41 - Limit BCM5701 B5 to 32-bit mode as a workaround for a bug which
causes data corruption in combination with certain bridges.
  Information about this problem was kindly provided by davidch. [1]
- As BGE_FLAG_PCIX is meant to indicate that the controller is in
  PCI-X mode, revert to the pre __FreeBSD_version 602101 method of
  reading the bus mode register rather than checking the mere
  existence of a PCI-X capability, which is also there when the
  NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X
  mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC
  to be tuned incorrectly.

PR:		128833 [1]
Reviewed by:	jhb
2008-12-15 20:40:06 +00:00
John Baldwin 7ed3652694 MFC: Support for the IC Plus IP101 10/100 PHY and Vitesse VSC8601 PHY that
are found on some nvidia parts.

Suggested by:	yongari
2008-12-05 19:53:12 +00:00
John Baldwin f4a3abddd7 MFC: Add the nfe(4) driver as an alternative to nve(4). To avoid
astonishment, nve(4) takes precedence over nfe(4) in this branch.
I have also not added it to GENERIC.

Reviewed by:	yongari (briefly)
2008-12-05 17:44:26 +00:00
Colin Percival ffc0b451e3 Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom returns.
Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-08:11.arc4random
2008-11-24 17:39:39 +00:00
Marcel Moolenaar 2a9d856bd6 Correct the Device ID of the NetMos quad UART.
PR:		128931
Approved by:	re (kensmith)
2008-11-23 17:33:59 +00:00
Konstantin Belousov 90107038e2 MFC of the r179312 by sos:
Do not call ata_start() when ata_reinit fails in the ioctl path.

Approved by:	re (kensmith), sos
Prodded by:	Andrey V. Elsukov <[email protected]>
2008-10-30 13:10:33 +00:00
Andrew Gallatin b0fd9728c6 Merge r183515 and r184211 (mxge firmware updates) into stable/6
Approved by:	re (kensmith)
Sponsored by:	Myricom Inc
2008-10-27 14:27:43 +00:00
Pyun YongHyeon 38f9bfaec7 MFC r183966:
Some 88E1149 PHY's page select is initialized to point to other
  bank instead of copper/fiber bank which in turn resulted in
  wrong registers were accessed during PHY operation. It is
  believed that page 0 should be used for copper PHY so reinitialize
  E1000_EADR to select default copper PHY.
  This fixes link establishment issue of nfe(4) on Sun Fire X4140.

  OpenBSD also has similimar patch but they just reset the E1000_EADR
  register to page 0. However some Marvell PHYs((88E3082, 88E1000)
  don't have the extended address register and the meaning of the
  register is quite different for each PHY model. So selecting copper
  PHY is limited to 88E1149 PHY which seems to be the only one that
  exhibits link establishment problem. If parent device know the type
  of PHY(either copper or fiber) that information should be notified
  to PHY driver but there is no good way to pass this information yet.

  Reported by:	thompsa
  Reviewed by:	thompsa
  Approved by:	re (gnn)
2008-10-23 00:56:01 +00:00
John Baldwin e9a00f1d7a MFC: Use 32k transfers rather than 63k transfers for chipsets that can't do
64k transfers and use the MIO method to talk to the Serverworks HT1000_S1
SATA controller.

Approved by:	re (kib)
2008-10-21 18:35:23 +00:00
Pyun YongHyeon 569d2d1fe2 MFC r183814:
Read PCI device id instead of PCI revision id. Also checks the read
  device id is JMC260 family. Previously it just verified the deivce
  is JMC260 Rev A0. This will make it easy for newer JMC2xx support.

  Pointed out by:	bouyer at NetBSD

MFC r183859:
  Make sure to read the last byte of EEPROM descriptor. Previously
  the last byte of the ethernet address was not read which in turn
  resulted in getting 5 out of the 6 bytes of ethernet address and
  always returned ENOENT. I did not notice the bug on FPGA version
  because of additional configuration data in EEPROM.

  Pointed out by:	bouyer at NetBSD

Approved by:	re (gnn)
2008-10-19 06:45:03 +00:00
Ollivier Robert 704149d927 Merge r179057 into stable/6, sorry it won't be in 6.4.
Add device ID for Nikon D300 digital camera.

PR:		usb/118741
Submitted by:	Yuri <[email protected]>
Approved by:	re (rwatson)
2008-10-17 15:06:34 +00:00
Pyun YongHyeon 23f1b18a80 MFC r183264:
Add workaround for occasional packet loss issue of JMC250 A2
  when it runs on half-duplex media.
  While I'm here add register definition for GPREG1. ATM the GPREG1
  register is only valid for JMC250 A1/A2.

  Submitted by:	Ethan at JMicron

Approved by:	re (kensmith)
2008-09-26 01:03:04 +00:00
Oleg Bulyzhin f4b32bb5b2 MFC: 182874
bge_tick(): do not touch PHY if link is up. This should solve problem with
extra input errors for some BCM57XX chips.

PR:		kern/122295
Approved by:	re (kensmith)
2008-09-18 22:29:05 +00:00
John Baldwin b289b551f7 MFC: Disable the inline assembly crc32 routine and use the C version
instead.

Approved by:	re (kib)
2008-09-17 20:18:37 +00:00
Pyun YongHyeon 4252b06b98 MFC r182887-182888:
r182887:
  Fix typo which resulted in invalid configuration for JMC260.

 r182888:
  Add workaround for CRC errors seen at 100Mbps on JMC250 A2.
  While here update chip revision number of JMC250/JMC260 from the
  latest datasheet.

Approved by:	re (kensmith)
2008-09-17 04:04:52 +00:00
John Baldwin 766e25866b MFC: Fix two places that used && instead of & to test if OBF was set.
Approved by:	re (kib)
2008-09-12 21:37:37 +00:00
John Baldwin c19e605fd6 MFC: Use single byte read and write operations to toggle the BIOS and OS
semaphores rather than 4 byte operations.

Approved by:	re (kensmith)
2008-09-11 19:37:26 +00:00
John Baldwin 3ea47f1bf1 MFC: Add more PCI IDs including those for ICH10.
Approved by:	re (kensmith)
2008-09-10 21:55:58 +00:00
Andrew Thompson 2f38d731bb MFC r181973, r181974, r181975
- Add the Avlab Technology PCI IO 4S-850 4 port serial card.
 - Add the VScom PCI-100L card.
 - Add the Decision Computer Inc, PCCOM 8-port serial card.

PR:             kern/110797, kern/72352, kern/69730
2008-08-31 18:05:00 +00:00
Pyun YongHyeon bcf9873762 MFC r181992:
Because bfe(4) knows interrupt mask value there is no need to read
  interrupt mask register again. This saves one register access per
  each interrupt.
  Also don't try to process frames when driver is not running.
2008-08-29 04:14:54 +00:00
Pyun YongHyeon a417fe111e MFC r181976:
Remove bfe_link in softc and introduce two new flags to mark
  link state and detach request.
  While I'm here make sure established link is IFM_10_T or
  IFM_100_TX as bfe(4) just supports 10/100Mbps media.
2008-08-29 03:56:58 +00:00
Pyun YongHyeon efba5fb279 Don't call bfe_release_resources() twice. 2008-08-29 01:54:48 +00:00
Pyun YongHyeon 2d9ae5a024 MFC r181953:
o Sort includes and add <endian.h> to support endianness.
   o Removed unneeded header files.
   o bus_dma(9) fix:
     - created parent tag with 1GB dma address limit with no
       alignment restrictions.
     - set 4096 alignment limit for Tx/Rx descriptor rings.
     - separate Rx buffer tag from Tx buffer tag such that Tx tag
       allows up-to 16 segments while Rx buffer tag only allows
       single segment.
     - it seems the controller has no alignment restrictions on Tx/Rx
       buffers. Remove ETHER_ALIGN alignment restriction in Tx/Rx
       buffers.
     - created a spare Rx dma map which would be used to cope with
       failure of loading a dma map.
     - make sure to load full Tx/Rx descriptor size for Tx/Rx
       descriptor dma maps, previously bfe(4) used to load single
       descriptor size for each descriptor rings. I have no idea how
       it could be run without problems.
     - don't blindly cast bus_addr_t type to 32bits in bfe_dma_map().
     - created bfe_dma_free() to free allocated dma memory/tags.
     - make sure to invoke bus_dmamap_sync(9) before/after processing
       descriptor rings/buffers. Because the hardware has severe dma
       address space limitation, bounce-buffers would be always used
       on systems with more than 1GB memory during
       descriptors/buffers access.
     - added Tx descriptor ring initialization function,
       bfe_list_tx_init().
     - moved producer/consumer index initialization to
       bfe_list_tx_init() and bfe_list_rx_init() from
       bfe_chip_reset().
     - added bfe_discard_buf() which will update loaded descriptors
       without unloading/reloading the dma map to speed up error
       recovery.
     - implemented Tx side bus_dmamap_load_mbuf_sg(9). The number of
       segments allowed was chosen to be 16 which should be enough for
       non-TSO capable hardwares. Setting SOF bit of Tx descriptor is
       done in the last to avoid potential race.
     - don't give up sending frames in bfe_start() until the hardware
       lacks free descriptors.
     - added XXX comment to second kick command and possible workaround.
     - implemented Rx side bus_dmamap_load_mbuf_sg(9).
     - removed bfe_dma_map_desc() as it's not needed anymore after
       the conversion to bus_dmamap_load_mbuf_sg(9).
     - added endianness support. With this change bfe(4) should work
       on any architectures that can create bounce buffers within 1GB
       address range.
     - add missing bus_dmamap_sync() in bfe_tx_eof()/bfe_rx_eof().
   o Use PCI_BAR instead of hardcoded value to set BARs.
     Simplified register access with bus_write_4(9)/bus_read_4(9) and
     removed bfe_btag, bfe_bhandle, bfe_vhandle in softc as it's not
     used anymore.
   o Reorder device detach logic such that bfe_detach() is also used
     for handling driver attach failure case.
   o Remove unnecessary KASSERT in bfe_detach().
   o Remove bfe_rx_cnt, bfe_up, bfe_vpd_prodname, bfe_vpd_readonly in
     softc.  It's not used at all.
   o Remove BFE_RX_RING_SIZE/BFE_RX_RING_SIZE/BFE_LINK_DOWN.
2008-08-29 01:48:22 +00:00
John Baldwin 1d07ec2d64 MFC: Properly handle a 32-bit prefetchable memory range in a PCI-PCI bridge. 2008-08-27 14:20:54 +00:00
Marius Strobl 4b2071044f MFC: r182060
- Restore the behavior of enabling the MII buffer for an internal
  PHY only and not also in the case of an external PHY currently
  doing full duplex, which accidentally got broken in r180504.
  It's still not clear to me why we need to enable the buffer for
  an internal PHY though.
- Count excess and late collisions as output errors. [1]
- Count receive errors as input errors. [1]

Obtained from:	NetBSD [1]
2008-08-26 18:13:40 +00:00
Max Laier 32774dc003 MFC r180753 by luoqi@:
Only enable MSI mappings for devices that use MSI.  Fixes interrupt loss
  on some nForce based boards.

PR:             kern/118842
2008-08-23 03:43:38 +00:00
Sean Bruno d3679be2d7 Remove MPT_LOCK/UNLOCK from mpt_user_attach in RELENG_6.
This was causing a panic with witness enabled.

Reviewed by:	scottl
2008-08-21 18:00:15 +00:00
Pyun YongHyeon a1857be210 MFC r181557:
Use device_set_desc() instead of device_set_desc_copy() as we don't
  manipulate the verbose description of a device.
2008-08-21 03:50:50 +00:00
Pyun YongHyeon f97b89cbc2 MFC r180954:
style(9) - space after keywords, don't indent case.
2008-08-21 03:39:03 +00:00
Pyun YongHyeon 7eb3b0e03c MFC r180952, r181556:
Nuke referencing softc in device probe.
2008-08-21 03:30:52 +00:00
Pyun YongHyeon fe50953123 MFC r180950:
s/printf/device_printf/g
  Don't hard code function name in device_printf() and use __func__.
  While I'm here nuke bfe_unit in softc as it's not needed anymore.

  Also remove bfe_release_resources() in bus_setup_intr(9) failure
  path as bfe_release_resources() is called again at the end of
  bfe_attach() if any error has encountered.
2008-08-21 02:34:53 +00:00
Pyun YongHyeon 01c2ad55df MFC r181619:
Restore link state handling which was broken in rev 1.69.
  Also report current link state while auto-negotiation is in
  progress.
  With this change link loss should be reported within a second
  and drivers that rely on link state should work.
2008-08-20 04:51:09 +00:00
Pyun YongHyeon 81bdb3075d MFC r181617-r181618:
r181617: Remove whitespace at the end of line.
 r181618: Remove 'cr' at the end of line.
2008-08-20 04:31:55 +00:00
John Baldwin 6c59730e02 MFC: If the kernel fails to allocate resources for the initial value of a
PCI BAR, then zero the BAR and clear the resource list entry so that a
new resource will be allocated by the device driver.
2008-08-15 20:17:08 +00:00
John Baldwin a77f215566 MFC: Use an sx lock to serialize writes and remove D_NEEDGIANT. 2008-08-14 18:37:49 +00:00
Henrik Brix Andersen 19b0e32c6d MFC of SVN rev 181482:
Add quirks for making uhid(4) ignore the Apple iPhone and iPhone 3G.

Approved by:	sam
2008-08-12 19:40:28 +00:00