aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/hpsa.c64
1 files changed, 30 insertions, 34 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 225a787dedf..af20dbd62d4 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2287,40 +2287,6 @@ static void cmd_special_free(struct ctlr_info *h, struct CommandList *c)
2287 2287
2288#ifdef CONFIG_COMPAT 2288#ifdef CONFIG_COMPAT
2289 2289
2290static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, void *arg);
2291static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
2292 int cmd, void *arg);
2293
2294static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void *arg)
2295{
2296 switch (cmd) {
2297 case CCISS_GETPCIINFO:
2298 case CCISS_GETINTINFO:
2299 case CCISS_SETINTINFO:
2300 case CCISS_GETNODENAME:
2301 case CCISS_SETNODENAME:
2302 case CCISS_GETHEARTBEAT:
2303 case CCISS_GETBUSTYPES:
2304 case CCISS_GETFIRMVER:
2305 case CCISS_GETDRIVVER:
2306 case CCISS_REVALIDVOLS:
2307 case CCISS_DEREGDISK:
2308 case CCISS_REGNEWDISK:
2309 case CCISS_REGNEWD:
2310 case CCISS_RESCANDISK:
2311 case CCISS_GETLUNINFO:
2312 return hpsa_ioctl(dev, cmd, arg);
2313
2314 case CCISS_PASSTHRU32:
2315 return hpsa_ioctl32_passthru(dev, cmd, arg);
2316 case CCISS_BIG_PASSTHRU32:
2317 return hpsa_ioctl32_big_passthru(dev, cmd, arg);
2318
2319 default:
2320 return -ENOIOCTLCMD;
2321 }
2322}
2323
2324static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, void *arg) 2290static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, void *arg)
2325{ 2291{
2326 IOCTL32_Command_struct __user *arg32 = 2292 IOCTL32_Command_struct __user *arg32 =
@@ -2391,6 +2357,36 @@ static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
2391 return -EFAULT; 2357 return -EFAULT;
2392 return err; 2358 return err;
2393} 2359}
2360
2361static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void *arg)
2362{
2363 switch (cmd) {
2364 case CCISS_GETPCIINFO:
2365 case CCISS_GETINTINFO:
2366 case CCISS_SETINTINFO:
2367 case CCISS_GETNODENAME:
2368 case CCISS_SETNODENAME:
2369 case CCISS_GETHEARTBEAT:
2370 case CCISS_GETBUSTYPES:
2371 case CCISS_GETFIRMVER:
2372 case CCISS_GETDRIVVER:
2373 case CCISS_REVALIDVOLS:
2374 case CCISS_DEREGDISK:
2375 case CCISS_REGNEWDISK:
2376 case CCISS_REGNEWD:
2377 case CCISS_RESCANDISK:
2378 case CCISS_GETLUNINFO:
2379 return hpsa_ioctl(dev, cmd, arg);
2380
2381 case CCISS_PASSTHRU32:
2382 return hpsa_ioctl32_passthru(dev, cmd, arg);
2383 case CCISS_BIG_PASSTHRU32:
2384 return hpsa_ioctl32_big_passthru(dev, cmd, arg);
2385
2386 default:
2387 return -ENOIOCTLCMD;
2388 }
2389}
2394#endif 2390#endif
2395 2391
2396static int hpsa_getpciinfo_ioctl(struct ctlr_info *h, void __user *argp) 2392static int hpsa_getpciinfo_ioctl(struct ctlr_info *h, void __user *argp)