diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 16:53:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 16:53:32 -0400 |
commit | ced3ec8aa7d0fa3300187ee47c144a22ccfc974e (patch) | |
tree | ea48651fe1b372685020cd67ac133240829c1576 /drivers/ide/pci/generic.c | |
parent | 04ba6e739e9c0623c25f94b191fd20dfbd1b26e3 (diff) |
ide: prefix messages from IDE PCI host drivers by driver name
Prefix messages from IDE PCI host drivers by driver name instead of marketed
chipset name (it is still possible to exactly identify the particular chipset
basing on driver messages).
As a bonus this provides nice code savings for some drivers:
text data bss dec hex filename
3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before
2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after
764 108 0 872 368 drivers/ide/pci/cs5520.o.before
680 108 0 788 314 drivers/ide/pci/cs5520.o.after
1680 112 4 1796 704 drivers/ide/pci/generic.o.before
1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after
7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before
6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after
2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before
2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after
2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before
2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after
3776 112 4 3892 f34 drivers/ide/pci/piix.o.before
2804 112 4 2920 b68 drivers/ide/pci/piix.o.after
4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before
4600 116 0 4716 126c drivers/ide/pci/siimage.o.after
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/generic.c')
-rw-r--r-- | drivers/ide/pci/generic.c | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index e034e21af7fe..b07d4f4273b3 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/ide.h> | 27 | #include <linux/ide.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | 29 | ||
30 | #define DRV_NAME "ide_pci_generic" | ||
31 | |||
30 | static int ide_generic_all; /* Set to claim all devices */ | 32 | static int ide_generic_all; /* Set to claim all devices */ |
31 | 33 | ||
32 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); | 34 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); |
@@ -34,9 +36,9 @@ MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE st | |||
34 | 36 | ||
35 | #define IDE_HFLAGS_UMC (IDE_HFLAG_NO_DMA | IDE_HFLAG_FORCE_LEGACY_IRQS) | 37 | #define IDE_HFLAGS_UMC (IDE_HFLAG_NO_DMA | IDE_HFLAG_FORCE_LEGACY_IRQS) |
36 | 38 | ||
37 | #define DECLARE_GENERIC_PCI_DEV(name_str, extra_flags) \ | 39 | #define DECLARE_GENERIC_PCI_DEV(extra_flags) \ |
38 | { \ | 40 | { \ |
39 | .name = name_str, \ | 41 | .name = DRV_NAME, \ |
40 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \ | 42 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \ |
41 | extra_flags, \ | 43 | extra_flags, \ |
42 | .swdma_mask = ATA_SWDMA2, \ | 44 | .swdma_mask = ATA_SWDMA2, \ |
@@ -45,10 +47,11 @@ MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE st | |||
45 | } | 47 | } |
46 | 48 | ||
47 | static const struct ide_port_info generic_chipsets[] __devinitdata = { | 49 | static const struct ide_port_info generic_chipsets[] __devinitdata = { |
48 | /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0), | 50 | /* 0: Unknown */ |
51 | DECLARE_GENERIC_PCI_DEV(0), | ||
49 | 52 | ||
50 | { /* 1 */ | 53 | { /* 1: NS87410 */ |
51 | .name = "NS87410", | 54 | .name = DRV_NAME, |
52 | .enablebits = { {0x43, 0x08, 0x08}, {0x47, 0x08, 0x08} }, | 55 | .enablebits = { {0x43, 0x08, 0x08}, {0x47, 0x08, 0x08} }, |
53 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 56 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, |
54 | .swdma_mask = ATA_SWDMA2, | 57 | .swdma_mask = ATA_SWDMA2, |
@@ -56,17 +59,15 @@ static const struct ide_port_info generic_chipsets[] __devinitdata = { | |||
56 | .udma_mask = ATA_UDMA6, | 59 | .udma_mask = ATA_UDMA6, |
57 | }, | 60 | }, |
58 | 61 | ||
59 | /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", 0), | 62 | /* 2: SAMURAI / HT6565 / HINT_IDE */ |
60 | /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", 0), | 63 | DECLARE_GENERIC_PCI_DEV(0), |
61 | /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", IDE_HFLAGS_UMC), | 64 | /* 3: UM8673F / UM8886A / UM8886BF */ |
62 | /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", IDE_HFLAGS_UMC), | 65 | DECLARE_GENERIC_PCI_DEV(IDE_HFLAGS_UMC), |
63 | /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", IDE_HFLAGS_UMC), | 66 | /* 4: VIA_IDE / OPTI621V / Piccolo010{2,3,5} */ |
64 | /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", 0), | 67 | DECLARE_GENERIC_PCI_DEV(IDE_HFLAG_NO_AUTODMA), |
65 | /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", IDE_HFLAG_NO_AUTODMA), | 68 | |
66 | /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", IDE_HFLAG_NO_AUTODMA), | 69 | { /* 5: VIA8237SATA */ |
67 | 70 | .name = DRV_NAME, | |
68 | { /* 10 */ | ||
69 | .name = "VIA8237SATA", | ||
70 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 71 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
71 | IDE_HFLAG_OFF_BOARD, | 72 | IDE_HFLAG_OFF_BOARD, |
72 | .swdma_mask = ATA_SWDMA2, | 73 | .swdma_mask = ATA_SWDMA2, |
@@ -74,12 +75,8 @@ static const struct ide_port_info generic_chipsets[] __devinitdata = { | |||
74 | .udma_mask = ATA_UDMA6, | 75 | .udma_mask = ATA_UDMA6, |
75 | }, | 76 | }, |
76 | 77 | ||
77 | /* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102", IDE_HFLAG_NO_AUTODMA), | 78 | { /* 6: Revolution */ |
78 | /* 12 */ DECLARE_GENERIC_PCI_DEV("Piccolo0103", IDE_HFLAG_NO_AUTODMA), | 79 | .name = DRV_NAME, |
79 | /* 13 */ DECLARE_GENERIC_PCI_DEV("Piccolo0105", IDE_HFLAG_NO_AUTODMA), | ||
80 | |||
81 | { /* 14 */ | ||
82 | .name = "Revolution", | ||
83 | .host_flags = IDE_HFLAG_CLEAR_SIMPLEX | | 80 | .host_flags = IDE_HFLAG_CLEAR_SIMPLEX | |
84 | IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 81 | IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
85 | IDE_HFLAG_OFF_BOARD, | 82 | IDE_HFLAG_OFF_BOARD, |
@@ -147,20 +144,20 @@ out: | |||
147 | static const struct pci_device_id generic_pci_tbl[] = { | 144 | static const struct pci_device_id generic_pci_tbl[] = { |
148 | { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_87410), 1 }, | 145 | { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_87410), 1 }, |
149 | { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), 2 }, | 146 | { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), 2 }, |
150 | { PCI_VDEVICE(HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), 3 }, | 147 | { PCI_VDEVICE(HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), 2 }, |
151 | { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8673F), 4 }, | 148 | { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8673F), 3 }, |
152 | { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886A), 5 }, | 149 | { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886A), 3 }, |
153 | { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886BF), 6 }, | 150 | { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886BF), 3 }, |
154 | { PCI_VDEVICE(HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), 7 }, | 151 | { PCI_VDEVICE(HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), 2 }, |
155 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C561), 8 }, | 152 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C561), 4 }, |
156 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C558), 9 }, | 153 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C558), 4 }, |
157 | #ifdef CONFIG_BLK_DEV_IDE_SATA | 154 | #ifdef CONFIG_BLK_DEV_IDE_SATA |
158 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237_SATA), 10 }, | 155 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237_SATA), 5 }, |
159 | #endif | 156 | #endif |
160 | { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO), 11 }, | 157 | { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO), 4 }, |
161 | { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), 12 }, | 158 | { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), 4 }, |
162 | { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), 13 }, | 159 | { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), 4 }, |
163 | { PCI_VDEVICE(NETCELL, PCI_DEVICE_ID_REVOLUTION), 14 }, | 160 | { PCI_VDEVICE(NETCELL, PCI_DEVICE_ID_REVOLUTION), 6 }, |
164 | /* | 161 | /* |
165 | * Must come last. If you add entries adjust | 162 | * Must come last. If you add entries adjust |
166 | * this table and generic_chipsets[] appropriately. | 163 | * this table and generic_chipsets[] appropriately. |