VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / scsi / sd.c
index 9d29d78..8fd4590 100644 (file)
 #include <linux/errno.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
-#include <linux/reboot.h>
-#include <linux/vmalloc.h>
 #include <linux/blkdev.h>
 #include <linux/blkpg.h>
 #include <linux/kref.h>
 #include <asm/uaccess.h>
 
-#include "scsi.h"
-#include "hosts.h"
-
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_driver.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_request.h>
 #include <scsi/scsicam.h>
 
 #include "scsi_logging.h"
@@ -592,7 +594,7 @@ static int sd_ioctl(struct inode * inode, struct file * filp,
                case SCSI_IOCTL_GET_BUS_NUMBER:
                        return scsi_ioctl(sdp, cmd, p);
                default:
-                       error = scsi_cmd_ioctl(disk, cmd, p);
+                       error = scsi_cmd_ioctl(filp, disk, cmd, p);
                        if (error != -ENOTTY)
                                return error;
        }
@@ -763,13 +765,13 @@ static void sd_rw_intr(struct scsi_cmnd * SCpnt)
                                good_bytes = 0;
                        break;
 
-               case RECOVERED_ERROR:
+               case RECOVERED_ERROR: /* an error occurred, but it recovered */
+               case NO_SENSE: /* LLDD got sense data */
                        /*
-                        * An error occurred, but it recovered.  Inform the
-                        * user, but make sure that it's not treated as a
-                        * hard error.
+                        * Inform the user, but make sure that it's not treated
+                        * as a hard error.
                         */
-                       print_sense("sd", SCpnt);
+                       scsi_print_sense("sd", SCpnt);
                        SCpnt->result = 0;
                        SCpnt->sense_buffer[0] = 0x0;
                        good_bytes = this_count;
@@ -918,7 +920,7 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname,
                         * probably pointless to loop */
                        if(!spintime) {
                                printk(KERN_NOTICE "%s: Unit Not Ready, sense:\n", diskname);
-                               print_req_sense("", SRpnt);
+                               scsi_print_req_sense("", SRpnt);
                        }
                        break;
                }
@@ -987,7 +989,7 @@ repeat:
                       driver_byte(the_result));
 
                if (driver_byte(the_result) & DRIVER_SENSE)
-                       print_req_sense("sd", SRpnt);
+                       scsi_print_req_sense("sd", SRpnt);
                else
                        printk("%s : sense not available. \n", diskname);
 
@@ -1542,7 +1544,7 @@ static void sd_shutdown(struct device *dev)
                                    status_byte(res), msg_byte(res),
                                    host_byte(res), driver_byte(res));
                        if (driver_byte(res) & DRIVER_SENSE)
-                               print_req_sense("sd", sreq);
+                               scsi_print_req_sense("sd", sreq);
        }
        
        scsi_release_request(sreq);