diff options
author | Junio C Hamano <junkio@cox.net> | 2007-07-09 17:17:56 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-09 17:17:56 -0400 |
commit | c2d3ce8c39cb17dfc8d0426a98bd79f5d7b21e36 (patch) | |
tree | c1dd749c39abfb70a81a5a5f34b6275021c5aeaf /drivers/ide/ide-dma.c | |
parent | 6d78013bfc20b8579827fc8f214c6f85d469c051 (diff) |
ide_in_drive_list(): accept NULL as the wildcard for firmware revision
Earlier, the matching of (model,rev) in ide-dma black/white list
handling was to consider "ALL" in the table to match any
revision. This makes NULL to be also an accepted wildcard, and
changes the entries of tables in ide-dma.c to use NULL.
The code still accepts "ALL" as the wildcard, in order to keep
any out-of-tree ide driver that feeds its own table that uses
"ALL" as the wildcard to ide_in_drive_list() function from
breaking.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index ca55bfa4ac74..e80f8e1a0b93 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -91,45 +91,45 @@ | |||
91 | 91 | ||
92 | static const struct drive_list_entry drive_whitelist [] = { | 92 | static const struct drive_list_entry drive_whitelist [] = { |
93 | 93 | ||
94 | { "Micropolis 2112A" , "ALL" }, | 94 | { "Micropolis 2112A" , NULL }, |
95 | { "CONNER CTMA 4000" , "ALL" }, | 95 | { "CONNER CTMA 4000" , NULL }, |
96 | { "CONNER CTT8000-A" , "ALL" }, | 96 | { "CONNER CTT8000-A" , NULL }, |
97 | { "ST34342A" , "ALL" }, | 97 | { "ST34342A" , NULL }, |
98 | { NULL , NULL } | 98 | { NULL , NULL } |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static const struct drive_list_entry drive_blacklist [] = { | 101 | static const struct drive_list_entry drive_blacklist [] = { |
102 | 102 | ||
103 | { "WDC AC11000H" , "ALL" }, | 103 | { "WDC AC11000H" , NULL }, |
104 | { "WDC AC22100H" , "ALL" }, | 104 | { "WDC AC22100H" , NULL }, |
105 | { "WDC AC32500H" , "ALL" }, | 105 | { "WDC AC32500H" , NULL }, |
106 | { "WDC AC33100H" , "ALL" }, | 106 | { "WDC AC33100H" , NULL }, |
107 | { "WDC AC31600H" , "ALL" }, | 107 | { "WDC AC31600H" , NULL }, |
108 | { "WDC AC32100H" , "24.09P07" }, | 108 | { "WDC AC32100H" , "24.09P07" }, |
109 | { "WDC AC23200L" , "21.10N21" }, | 109 | { "WDC AC23200L" , "21.10N21" }, |
110 | { "Compaq CRD-8241B" , "ALL" }, | 110 | { "Compaq CRD-8241B" , NULL }, |
111 | { "CRD-8400B" , "ALL" }, | 111 | { "CRD-8400B" , NULL }, |
112 | { "CRD-8480B", "ALL" }, | 112 | { "CRD-8480B", NULL }, |
113 | { "CRD-8482B", "ALL" }, | 113 | { "CRD-8482B", NULL }, |
114 | { "CRD-84" , "ALL" }, | 114 | { "CRD-84" , NULL }, |
115 | { "SanDisk SDP3B" , "ALL" }, | 115 | { "SanDisk SDP3B" , NULL }, |
116 | { "SanDisk SDP3B-64" , "ALL" }, | 116 | { "SanDisk SDP3B-64" , NULL }, |
117 | { "SANYO CD-ROM CRD" , "ALL" }, | 117 | { "SANYO CD-ROM CRD" , NULL }, |
118 | { "HITACHI CDR-8" , "ALL" }, | 118 | { "HITACHI CDR-8" , NULL }, |
119 | { "HITACHI CDR-8335" , "ALL" }, | 119 | { "HITACHI CDR-8335" , NULL }, |
120 | { "HITACHI CDR-8435" , "ALL" }, | 120 | { "HITACHI CDR-8435" , NULL }, |
121 | { "Toshiba CD-ROM XM-6202B" , "ALL" }, | 121 | { "Toshiba CD-ROM XM-6202B" , NULL }, |
122 | { "TOSHIBA CD-ROM XM-1702BC", "ALL" }, | 122 | { "TOSHIBA CD-ROM XM-1702BC", NULL }, |
123 | { "CD-532E-A" , "ALL" }, | 123 | { "CD-532E-A" , NULL }, |
124 | { "E-IDE CD-ROM CR-840", "ALL" }, | 124 | { "E-IDE CD-ROM CR-840", NULL }, |
125 | { "CD-ROM Drive/F5A", "ALL" }, | 125 | { "CD-ROM Drive/F5A", NULL }, |
126 | { "WPI CDD-820", "ALL" }, | 126 | { "WPI CDD-820", NULL }, |
127 | { "SAMSUNG CD-ROM SC-148C", "ALL" }, | 127 | { "SAMSUNG CD-ROM SC-148C", NULL }, |
128 | { "SAMSUNG CD-ROM SC", "ALL" }, | 128 | { "SAMSUNG CD-ROM SC", NULL }, |
129 | { "ATAPI CD-ROM DRIVE 40X MAXIMUM", "ALL" }, | 129 | { "ATAPI CD-ROM DRIVE 40X MAXIMUM", NULL }, |
130 | { "_NEC DV5800A", "ALL" }, | 130 | { "_NEC DV5800A", NULL }, |
131 | { "SAMSUNG CD-ROM SN-124", "N001" }, | 131 | { "SAMSUNG CD-ROM SN-124", "N001" }, |
132 | { "Seagate STT20000A", "ALL" }, | 132 | { "Seagate STT20000A", NULL }, |
133 | { NULL , NULL } | 133 | { NULL , NULL } |
134 | 134 | ||
135 | }; | 135 | }; |
@@ -147,8 +147,9 @@ int ide_in_drive_list(struct hd_driveid *id, const struct drive_list_entry *driv | |||
147 | { | 147 | { |
148 | for ( ; drive_table->id_model ; drive_table++) | 148 | for ( ; drive_table->id_model ; drive_table++) |
149 | if ((!strcmp(drive_table->id_model, id->model)) && | 149 | if ((!strcmp(drive_table->id_model, id->model)) && |
150 | ((strstr(id->fw_rev, drive_table->id_firmware)) || | 150 | (!drive_table->id_firmware || |
151 | (!strcmp(drive_table->id_firmware, "ALL")))) | 151 | !strcmp(drive_table->id_firmware, "ALL") || /* to be removed later */ |
152 | strstr(id->fw_rev, drive_table->id_firmware))) | ||
152 | return 1; | 153 | return 1; |
153 | return 0; | 154 | return 0; |
154 | } | 155 | } |