diff options
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.h | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.h b/drivers/scsi/pcmcia/nsp_cs.h index 625ca97da52d..9102cbdf1359 100644 --- a/drivers/scsi/pcmcia/nsp_cs.h +++ b/drivers/scsi/pcmcia/nsp_cs.h | |||
@@ -290,7 +290,6 @@ typedef struct _nsp_hw_data { | |||
290 | #endif | 290 | #endif |
291 | } nsp_hw_data; | 291 | } nsp_hw_data; |
292 | 292 | ||
293 | |||
294 | /**************************************************************************** | 293 | /**************************************************************************** |
295 | * | 294 | * |
296 | */ | 295 | */ |
@@ -302,22 +301,13 @@ static int nsp_cs_config (struct pcmcia_device *link); | |||
302 | 301 | ||
303 | /* Linux SCSI subsystem specific functions */ | 302 | /* Linux SCSI subsystem specific functions */ |
304 | static struct Scsi_Host *nsp_detect (struct scsi_host_template *sht); | 303 | static struct Scsi_Host *nsp_detect (struct scsi_host_template *sht); |
305 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) | ||
306 | static int nsp_detect_old (struct scsi_host_template *sht); | ||
307 | static int nsp_release_old(struct Scsi_Host *shpnt); | ||
308 | #endif | ||
309 | static const char *nsp_info (struct Scsi_Host *shpnt); | 304 | static const char *nsp_info (struct Scsi_Host *shpnt); |
310 | static int nsp_proc_info ( | 305 | static int nsp_proc_info ( |
311 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) | ||
312 | struct Scsi_Host *host, | 306 | struct Scsi_Host *host, |
313 | #endif | ||
314 | char *buffer, | 307 | char *buffer, |
315 | char **start, | 308 | char **start, |
316 | off_t offset, | 309 | off_t offset, |
317 | int length, | 310 | int length, |
318 | #if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) | ||
319 | int hostno, | ||
320 | #endif | ||
321 | int inout); | 311 | int inout); |
322 | static int nsp_queuecommand(struct scsi_cmnd *SCpnt, | 312 | static int nsp_queuecommand(struct scsi_cmnd *SCpnt, |
323 | void (* done)(struct scsi_cmnd *SCpnt)); | 313 | void (* done)(struct scsi_cmnd *SCpnt)); |
@@ -356,7 +346,6 @@ static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht); | |||
356 | static int __init nsp_cs_init(void); | 346 | static int __init nsp_cs_init(void); |
357 | static void __exit nsp_cs_exit(void); | 347 | static void __exit nsp_cs_exit(void); |
358 | 348 | ||
359 | |||
360 | /* Debug */ | 349 | /* Debug */ |
361 | #ifdef NSP_DEBUG | 350 | #ifdef NSP_DEBUG |
362 | static void show_command (struct scsi_cmnd *SCpnt); | 351 | static void show_command (struct scsi_cmnd *SCpnt); |
@@ -401,7 +390,6 @@ enum _burst_mode { | |||
401 | BURST_MEM32 = 2, | 390 | BURST_MEM32 = 2, |
402 | }; | 391 | }; |
403 | 392 | ||
404 | |||
405 | /************************************************************************** | 393 | /************************************************************************** |
406 | * SCSI messaage | 394 | * SCSI messaage |
407 | */ | 395 | */ |
@@ -413,62 +401,8 @@ enum _burst_mode { | |||
413 | 401 | ||
414 | #define MSG_EXT_SDTR 0x01 | 402 | #define MSG_EXT_SDTR 0x01 |
415 | 403 | ||
416 | |||
417 | /************************************************************************** | ||
418 | * Compatibility functions | ||
419 | */ | ||
420 | |||
421 | /* for Kernel 2.4 */ | ||
422 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) | ||
423 | # define scsi_register_host(template) scsi_register_module(MODULE_SCSI_HA, template) | ||
424 | # define scsi_unregister_host(template) scsi_unregister_module(MODULE_SCSI_HA, template) | ||
425 | # define scsi_host_put(host) scsi_unregister(host) | ||
426 | |||
427 | typedef void irqreturn_t; | ||
428 | # define IRQ_NONE /* */ | ||
429 | # define IRQ_HANDLED /* */ | ||
430 | # define IRQ_RETVAL(x) /* */ | ||
431 | |||
432 | /* This is ad-hoc version of scsi_host_get_next() */ | ||
433 | static inline struct Scsi_Host *scsi_host_get_next(struct Scsi_Host *host) | ||
434 | { | ||
435 | if (host == NULL) { | ||
436 | return scsi_hostlist; | ||
437 | } else { | ||
438 | return host->next; | ||
439 | } | ||
440 | } | ||
441 | |||
442 | /* This is ad-hoc version of scsi_host_hn_get() */ | ||
443 | static inline struct Scsi_Host *scsi_host_hn_get(unsigned short hostno) | ||
444 | { | ||
445 | struct Scsi_Host *host; | ||
446 | |||
447 | for (host = scsi_host_get_next(NULL); host != NULL; | ||
448 | host = scsi_host_get_next(host)) { | ||
449 | if (host->host_no == hostno) { | ||
450 | break; | ||
451 | } | ||
452 | } | ||
453 | |||
454 | return host; | ||
455 | } | ||
456 | |||
457 | static void cs_error(struct pcmcia_device *handle, int func, int ret) | ||
458 | { | ||
459 | error_info_t err = { func, ret }; | ||
460 | pcmcia_report_error(handle, &err); | ||
461 | } | ||
462 | |||
463 | /* scatter-gather table */ | ||
464 | # define BUFFER_ADDR (SCpnt->SCp.buffer->address) | ||
465 | #endif | ||
466 | |||
467 | /* for Kernel 2.6 */ | ||
468 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) | ||
469 | /* scatter-gather table */ | 404 | /* scatter-gather table */ |
470 | # define BUFFER_ADDR ((char *)((unsigned int)(SCpnt->SCp.buffer->page) + SCpnt->SCp.buffer->offset)) | 405 | # define BUFFER_ADDR ((char *)((unsigned int)(SCpnt->SCp.buffer->page) + SCpnt->SCp.buffer->offset)) |
471 | #endif | ||
472 | 406 | ||
473 | #endif /*__nsp_cs__*/ | 407 | #endif /*__nsp_cs__*/ |
474 | /* end */ | 408 | /* end */ |