diff options
Diffstat (limited to 'drivers/scsi/pcmcia/qlogic_stub.c')
-rw-r--r-- | drivers/scsi/pcmcia/qlogic_stub.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index 61c2eb03a9b5..86c2ac6ae623 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
@@ -178,7 +178,6 @@ static int qlogic_probe(struct pcmcia_device *link) | |||
178 | link->conf.IntType = INT_MEMORY_AND_IO; | 178 | link->conf.IntType = INT_MEMORY_AND_IO; |
179 | link->conf.Present = PRESENT_OPTION; | 179 | link->conf.Present = PRESENT_OPTION; |
180 | 180 | ||
181 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | ||
182 | return qlogic_config(link); | 181 | return qlogic_config(link); |
183 | } /* qlogic_attach */ | 182 | } /* qlogic_attach */ |
184 | 183 | ||
@@ -188,9 +187,7 @@ static void qlogic_detach(struct pcmcia_device *link) | |||
188 | { | 187 | { |
189 | DEBUG(0, "qlogic_detach(0x%p)\n", link); | 188 | DEBUG(0, "qlogic_detach(0x%p)\n", link); |
190 | 189 | ||
191 | if (link->state & DEV_CONFIG) | 190 | qlogic_release(link); |
192 | qlogic_release(link); | ||
193 | |||
194 | kfree(link->priv); | 191 | kfree(link->priv); |
195 | 192 | ||
196 | } /* qlogic_detach */ | 193 | } /* qlogic_detach */ |
@@ -224,9 +221,6 @@ static int qlogic_config(struct pcmcia_device * link) | |||
224 | if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) && (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) | 221 | if ((pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) && (pcmcia_get_tuple_data(link, &tuple) == CS_SUCCESS)) |
225 | info->manf_id = le16_to_cpu(tuple.TupleData[0]); | 222 | info->manf_id = le16_to_cpu(tuple.TupleData[0]); |
226 | 223 | ||
227 | /* Configure card */ | ||
228 | link->state |= DEV_CONFIG; | ||
229 | |||
230 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 224 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
231 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 225 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
232 | while (1) { | 226 | while (1) { |
@@ -272,7 +266,6 @@ static int qlogic_config(struct pcmcia_device * link) | |||
272 | link->dev_node = &info->node; | 266 | link->dev_node = &info->node; |
273 | info->host = host; | 267 | info->host = host; |
274 | 268 | ||
275 | link->state &= ~DEV_CONFIG_PENDING; | ||
276 | return 0; | 269 | return 0; |
277 | 270 | ||
278 | cs_failed: | 271 | cs_failed: |
@@ -302,20 +295,18 @@ static void qlogic_release(struct pcmcia_device *link) | |||
302 | 295 | ||
303 | static int qlogic_resume(struct pcmcia_device *link) | 296 | static int qlogic_resume(struct pcmcia_device *link) |
304 | { | 297 | { |
305 | if (link->state & DEV_CONFIG) { | 298 | scsi_info_t *info = link->priv; |
306 | scsi_info_t *info = link->priv; | 299 | |
307 | 300 | pcmcia_request_configuration(link, &link->conf); | |
308 | pcmcia_request_configuration(link, &link->conf); | 301 | if ((info->manf_id == MANFID_MACNICA) || |
309 | if ((info->manf_id == MANFID_MACNICA) || | 302 | (info->manf_id == MANFID_PIONEER) || |
310 | (info->manf_id == MANFID_PIONEER) || | 303 | (info->manf_id == 0x0098)) { |
311 | (info->manf_id == 0x0098)) { | 304 | outb(0x80, link->io.BasePort1 + 0xd); |
312 | outb(0x80, link->io.BasePort1 + 0xd); | 305 | outb(0x24, link->io.BasePort1 + 0x9); |
313 | outb(0x24, link->io.BasePort1 + 0x9); | 306 | outb(0x04, link->io.BasePort1 + 0xd); |
314 | outb(0x04, link->io.BasePort1 + 0xd); | ||
315 | } | ||
316 | /* Ugggglllyyyy!!! */ | ||
317 | qlogicfas408_bus_reset(NULL); | ||
318 | } | 307 | } |
308 | /* Ugggglllyyyy!!! */ | ||
309 | qlogicfas408_bus_reset(NULL); | ||
319 | 310 | ||
320 | return 0; | 311 | return 0; |
321 | } | 312 | } |