git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
scsi
/
sr_vendor.c
diff --git
a/drivers/scsi/sr_vendor.c
b/drivers/scsi/sr_vendor.c
index
2f7894e
..
4eb3da9
100644
(file)
--- a/
drivers/scsi/sr_vendor.c
+++ b/
drivers/scsi/sr_vendor.c
@@
-34,17
+34,18
@@
* HP 6020 writers now supported.
*/
* HP 6020 writers now supported.
*/
-#include <linux/c
onfig
.h>
+#include <linux/c
drom
.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/bcd.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/bcd.h>
-
#include <linux/blkdev.h>
#include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/scsi_ioctl.h>
-#include <linux/cdrom.h>
#include "sr.h"
#if 0
#include "sr.h"
#if 0
@@
-66,8
+67,8
@@
void sr_vendor_init(Scsi_CD *cd)
#ifndef CONFIG_BLK_DEV_SR_VENDOR
cd->vendor = VENDOR_SCSI3;
#else
#ifndef CONFIG_BLK_DEV_SR_VENDOR
cd->vendor = VENDOR_SCSI3;
#else
- char *vendor = cd->device->vendor;
- char *model = cd->device->model;
+ c
onst c
har *vendor = cd->device->vendor;
+ c
onst c
har *model = cd->device->model;
/* default */
cd->vendor = VENDOR_SCSI3;
/* default */
cd->vendor = VENDOR_SCSI3;
@@
-116,7
+117,7
@@
int sr_set_blocklength(Scsi_CD *cd, int blocklength)
density = (blocklength > 2048) ? 0x81 : 0x83;
#endif
density = (blocklength > 2048) ? 0x81 : 0x83;
#endif
- buffer =
(unsigned char *)
kmalloc(512, GFP_KERNEL | GFP_DMA);
+ buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
if (!buffer)
return -ENOMEM;
if (!buffer)
return -ENOMEM;
@@
-135,7
+136,7
@@
int sr_set_blocklength(Scsi_CD *cd, int blocklength)
modesel->block_length_lo = blocklength & 0xff;
cgc.buffer = buffer;
cgc.buflen = sizeof(*modesel);
modesel->block_length_lo = blocklength & 0xff;
cgc.buffer = buffer;
cgc.buflen = sizeof(*modesel);
- cgc.data_direction =
SCSI_DATA_WRIT
E;
+ cgc.data_direction =
DMA_TO_DEVIC
E;
cgc.timeout = VENDOR_TIMEOUT;
if (0 == (rc = sr_do_ioctl(cd, &cgc))) {
cd->device->sector_size = blocklength;
cgc.timeout = VENDOR_TIMEOUT;
if (0 == (rc = sr_do_ioctl(cd, &cgc))) {
cd->device->sector_size = blocklength;
@@
-163,7
+164,7
@@
int sr_cd_check(struct cdrom_device_info *cdi)
if (cd->cdi.mask & CDC_MULTI_SESSION)
return 0;
if (cd->cdi.mask & CDC_MULTI_SESSION)
return 0;
- buffer =
(unsigned char *)
kmalloc(512, GFP_KERNEL | GFP_DMA);
+ buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
if (!buffer)
return -ENOMEM;
if (!buffer)
return -ENOMEM;
@@
-182,7
+183,7
@@
int sr_cd_check(struct cdrom_device_info *cdi)
cgc.buffer = buffer;
cgc.buflen = 12;
cgc.quiet = 1;
cgc.buffer = buffer;
cgc.buflen = 12;
cgc.quiet = 1;
- cgc.data_direction =
SCSI_DATA_READ
;
+ cgc.data_direction =
DMA_FROM_DEVICE
;
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0)
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0)
@@
-210,7
+211,7
@@
int sr_cd_check(struct cdrom_device_info *cdi)
cgc.buffer = buffer;
cgc.buflen = 0x16;
cgc.quiet = 1;
cgc.buffer = buffer;
cgc.buflen = 0x16;
cgc.quiet = 1;
- cgc.data_direction =
SCSI_DATA_READ
;
+ cgc.data_direction =
DMA_FROM_DEVICE
;
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0)
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0)
@@
-239,7
+240,7
@@
int sr_cd_check(struct cdrom_device_info *cdi)
cgc.buffer = buffer;
cgc.buflen = 4;
cgc.quiet = 1;
cgc.buffer = buffer;
cgc.buflen = 4;
cgc.quiet = 1;
- cgc.data_direction =
SCSI_DATA_READ
;
+ cgc.data_direction =
DMA_FROM_DEVICE
;
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc == -EINVAL) {
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc == -EINVAL) {
@@
-268,7
+269,7
@@
int sr_cd_check(struct cdrom_device_info *cdi)
cgc.buffer = buffer;
cgc.buflen = 0x04;
cgc.quiet = 1;
cgc.buffer = buffer;
cgc.buflen = 0x04;
cgc.quiet = 1;
- cgc.data_direction =
SCSI_DATA_READ
;
+ cgc.data_direction =
DMA_FROM_DEVICE
;
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0) {
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0) {
@@
-286,7
+287,7
@@
int sr_cd_check(struct cdrom_device_info *cdi)
cgc.buffer = buffer;
cgc.buflen = 12;
cgc.quiet = 1;
cgc.buffer = buffer;
cgc.buflen = 12;
cgc.quiet = 1;
- cgc.data_direction =
SCSI_DATA_READ
;
+ cgc.data_direction =
DMA_FROM_DEVICE
;
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0) {
cgc.timeout = VENDOR_TIMEOUT;
rc = sr_do_ioctl(cd, &cgc);
if (rc != 0) {