aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-05-11 14:21:47 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-11 17:53:41 -0400
commitf30cac6fbf30d92d517768fdbd616cd196b43d1d (patch)
tree54da9552d22205d472d6980876eba0601409b969 /drivers/net/sky2.c
parent78f0b62d4c15580369acf830f73a1f22570f201e (diff)
sky2: only disable 88e8056 on some boards
Use DMI to add a blacklist of broken boards (so far only one). Hopefully, the problems will be solved later, and the the whole blacklist can disappear. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c41
1 files changed, 30 insertions, 11 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 2971eab2453c..104e20456e6f 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -40,6 +40,7 @@
40#include <linux/if_vlan.h> 40#include <linux/if_vlan.h>
41#include <linux/prefetch.h> 41#include <linux/prefetch.h>
42#include <linux/mii.h> 42#include <linux/mii.h>
43#include <linux/dmi.h>
43 44
44#include <asm/irq.h> 45#include <asm/irq.h>
45 46
@@ -150,6 +151,8 @@ static const char *yukon2_name[] = {
150 "FE", /* 0xb7 */ 151 "FE", /* 0xb7 */
151}; 152};
152 153
154static int dmi_blacklisted;
155
153/* Access to external PHY */ 156/* Access to external PHY */
154static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val) 157static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
155{ 158{
@@ -2531,6 +2534,17 @@ static int __devinit sky2_init(struct sky2_hw *hw)
2531 return -EOPNOTSUPP; 2534 return -EOPNOTSUPP;
2532 } 2535 }
2533 2536
2537
2538 /* Some Gigabyte motherboards have 88e8056 but cause problems
2539 * There is some unresolved hardware related problem that causes
2540 * descriptor errors and receive data corruption.
2541 */
2542 if (hw->chip_id == CHIP_ID_YUKON_EC_U && dmi_blacklisted) {
2543 dev_err(&hw->pdev->dev,
2544 "88E8056 on this motherboard not supported\n");
2545 return -EOPNOTSUPP;
2546 }
2547
2534 hw->pmd_type = sky2_read8(hw, B2_PMD_TYP); 2548 hw->pmd_type = sky2_read8(hw, B2_PMD_TYP);
2535 hw->ports = 1; 2549 hw->ports = 1;
2536 t8 = sky2_read8(hw, B2_Y2_HW_RES); 2550 t8 = sky2_read8(hw, B2_Y2_HW_RES);
@@ -3578,17 +3592,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
3578 goto err_out; 3592 goto err_out;
3579 } 3593 }
3580 3594
3581 /* Some Gigabyte motherboards have 88e8056 but cause problems
3582 * There is some unresolved hardware related problem that causes
3583 * descriptor errors and receive data corruption.
3584 */
3585 if (pdev->vendor == PCI_VENDOR_ID_MARVELL &&
3586 pdev->device == 0x4364 && pdev->subsystem_vendor == 0x1458) {
3587 dev_err(&pdev->dev,
3588 "88E8056 on Gigabyte motherboards not supported\n");
3589 goto err_out_disable;
3590 }
3591
3592 err = pci_request_regions(pdev, DRV_NAME); 3595 err = pci_request_regions(pdev, DRV_NAME);
3593 if (err) { 3596 if (err) {
3594 dev_err(&pdev->dev, "cannot obtain PCI resources\n"); 3597 dev_err(&pdev->dev, "cannot obtain PCI resources\n");
@@ -3907,8 +3910,24 @@ static struct pci_driver sky2_driver = {
3907 .shutdown = sky2_shutdown, 3910 .shutdown = sky2_shutdown,
3908}; 3911};
3909 3912
3913static struct dmi_system_id __initdata broken_dmi_table[] = {
3914 {
3915 .ident = "Gigabyte 965P-S3",
3916 .matches = {
3917 DMI_MATCH(DMI_SYS_VENDOR, "Gigabyte Technology Co., Ltd."),
3918 DMI_MATCH(DMI_PRODUCT_NAME, "965P-S3"),
3919
3920 },
3921 },
3922 { }
3923};
3924
3910static int __init sky2_init_module(void) 3925static int __init sky2_init_module(void)
3911{ 3926{
3927 /* Look for sick motherboards */
3928 if (dmi_check_system(broken_dmi_table))
3929 dmi_blacklisted = 1;
3930
3912 return pci_register_driver(&sky2_driver); 3931 return pci_register_driver(&sky2_driver);
3913} 3932}
3914 3933