• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/scsi/

Lines Matching defs:scsi

2  * linux/drivers/scsi/ide-scsi.c	Version 0.9		Jul   4, 1999
55 #include <scsi/scsi.h>
56 #include <scsi/scsi_cmnd.h>
57 #include <scsi/scsi_device.h>
58 #include <scsi/scsi_host.h>
59 #include <scsi/scsi_tcq.h>
60 #include <scsi/sg.h>
120 struct ide_scsi_obj *scsi = NULL;
123 scsi = ide_scsi_g(disk);
124 if (scsi)
125 scsi_host_get(scsi->host);
127 return scsi;
130 static void ide_scsi_put(struct ide_scsi_obj *scsi)
133 scsi_host_put(scsi->host);
153 * ide-scsi requests.
179 printk (KERN_ERR "ide-scsi: scatter gather table too small, discarding data\n");
214 printk (KERN_ERR "ide-scsi: scatter gather table too small, padding with zeros\n");
325 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
353 if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
354 printk ("ide-scsi: %s: queue cmd = ", drive->name);
357 rq->rq_disk = scsi->disk;
393 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
396 int log = test_bit(IDESCSI_LOG_CMD, &scsi->log);
410 printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number);
423 printk (KERN_WARNING "ide-scsi: %s: timed out for %lu\n",
429 printk ("ide-scsi: %s: I/O error for %lu\n", drive->name, pc->scsi_cmd->serial_number);
432 printk ("ide-scsi: %s: check condition for %lu\n", drive->name, pc->scsi_cmd->serial_number);
441 printk ("ide-scsi: %s: suc %lu", drive->name, pc->scsi_cmd->serial_number);
455 scsi->pc = NULL;
466 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
467 idescsi_pc_t *pc = scsi->pc;
482 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
483 idescsi_pc_t *pc=scsi->pc;
493 printk (KERN_INFO "ide-scsi: Reached idescsi_pc_intr interrupt handler\n");
501 /* end this request now - scsi should retry it*/
507 printk ("ide-scsi: %s: DMA complete\n", drive->name);
519 if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
532 printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n");
539 printk(KERN_ERR "ide-scsi: The scsi wants to "
549 printk(KERN_ERR "ide-scsi: transferred %d of %d bytes\n", temp, bcount.all);
558 printk (KERN_NOTICE "ide-scsi: The scsi wants to send us more data than expected - allowing transfer\n");
587 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
588 idescsi_pc_t *pc = scsi->pc;
593 printk(KERN_ERR "ide-scsi: Strange, packet command "
599 printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while "
607 drive->hwif->atapi_output_bytes(drive, scsi->pc->c, 12);
664 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
669 scsi->pc=pc; /* Set the current packet command */
692 if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) {
719 blk_dump_rq_flags(rq, "ide-scsi: unsup command");
727 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
735 ide_add_setting(drive, "transform", SETTING_RW, TYPE_INT, 0, 3, 1, 1, &scsi->transform, NULL);
736 ide_add_setting(drive, "log", SETTING_RW, TYPE_INT, 0, 1, 1, 1, &scsi->log, NULL);
745 static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
748 set_bit (IDESCSI_DRQ_INTERRUPT, &scsi->flags);
749 set_bit(IDESCSI_TRANSFORM, &scsi->transform);
750 clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
752 set_bit(IDESCSI_LOG_CMD, &scsi->log);
760 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
761 struct gendisk *g = scsi->disk;
763 ide_proc_unregister_driver(drive, scsi->driver);
772 ide_scsi_put(scsi);
787 .name = "ide-scsi",
807 struct ide_scsi_obj *scsi;
809 if (!(scsi = ide_scsi_get(disk)))
818 struct ide_scsi_obj *scsi = ide_scsi_g(disk);
820 ide_scsi_put(scsi);
829 struct ide_scsi_obj *scsi = ide_scsi_g(bdev->bd_disk);
830 return generic_ide_ioctl(scsi->drive, file, bdev, cmd, arg);
854 idescsi_scsi_t *scsi = scsihost_to_idescsi(dev->host);
858 set_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
860 clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
863 return put_user(test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform), (int __user *) arg);
869 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
873 return test_bit(IDESCSI_TRANSFORM, &scsi->transform);
880 idescsi_scsi_t *scsi = scsihost_to_idescsi(host);
881 ide_drive_t *drive = scsi->drive;
889 scsi = drive_to_idescsi(drive);
893 printk (KERN_ERR "ide-scsi: %s: out of memory\n", drive->name);
918 if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
919 printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
922 printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number);
931 rq->rq_disk = scsi->disk;
945 idescsi_scsi_t *scsi = scsihost_to_idescsi(cmd->device->host);
946 ide_drive_t *drive = scsi->drive;
952 if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
953 printk (KERN_WARNING "ide-scsi: abort called for %lu\n", cmd->serial_number);
956 printk (KERN_WARNING "ide-scsi: Drive not set in idescsi_eh_abort\n");
964 if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
965 printk (KERN_WARNING "ide-scsi: drive did%s become ready\n", busy?" not":"");
970 if (!scsi->pc) {
976 if (scsi->pc->scsi_cmd->serial_number == cmd->serial_number && !busy &&
977 elv_queue_empty(drive->queue) && HWGROUP(drive)->rq != scsi->pc->rq) {
978 printk (KERN_ERR "ide-scsi: cmd aborted!\n");
980 if (blk_sense_request(scsi->pc->rq))
981 kfree(scsi->pc->buffer);
982 kfree(scsi->pc->rq);
983 kfree(scsi->pc);
984 scsi->pc = NULL;
992 if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
993 printk (KERN_WARNING "ide-scsi: abort returns %s\n", ret == SUCCESS?"success":"failed");
1001 idescsi_scsi_t *scsi = scsihost_to_idescsi(cmd->device->host);
1002 ide_drive_t *drive = scsi->drive;
1008 if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
1009 printk (KERN_WARNING "ide-scsi: reset called for %lu\n", cmd->serial_number);
1012 printk (KERN_WARNING "ide-scsi: Drive not set in idescsi_eh_reset\n");
1020 if (!scsi->pc || (req = scsi->pc->rq) != HWGROUP(drive)->rq || !HWGROUP(drive)->handler) {
1021 printk (KERN_WARNING "ide-scsi: No active request in idescsi_eh_reset\n");
1031 kfree(scsi->pc->buffer);
1032 kfree(scsi->pc);
1033 scsi->pc = NULL;
1060 printk (KERN_ERR "ide-scsi: reset failed!\n");
1099 .proc_name = "ide-scsi",
1111 printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
1118 if (!strstr("ide-scsi", drive->driver_req) ||