9f3dc97580
Do not pass the element descriptor size to SCSI_ReadElementStatus(); SCSI_ReadElementStatus() will then issue a SC_COM_RES to know how much space it needs to allocate, then issue a second one with the proper size. Fix problems with newer changers, which returns a descriptor status larger than sizeof(DataTransferElementDescriptor_T). These changes makes the Overland neo2000/SDLT320 work with amanda. Ride the libtool PKGREVISION bump.
75 lines
2.8 KiB
Text
75 lines
2.8 KiB
Text
$NetBSD: patch-ae,v 1.7 2004/10/03 09:19:16 bouyer Exp $
|
|
|
|
--- changer-src/scsi-changer-driver.c.orig Sun Jan 26 20:20:56 2003
|
|
+++ changer-src/scsi-changer-driver.c Sat Oct 2 20:54:52 2004
|
|
@@ -372,6 +372,18 @@
|
|
NoBarCode,
|
|
GenericSearch,
|
|
GenericSenseHandler},
|
|
+ {"SDLT320",
|
|
+ "DLT Tape [SDLT320]",
|
|
+ DoNothing,
|
|
+ DoNothing,
|
|
+ DoNothing,
|
|
+ DoNothing,
|
|
+ DLT4000Eject,
|
|
+ GenericClean,
|
|
+ GenericRewind,
|
|
+ GenericBarCode,
|
|
+ GenericSearch,
|
|
+ GenericSenseHandler},
|
|
{"DLT8000",
|
|
"DLT Tape [DLT8000]",
|
|
DoNothing,
|
|
@@ -1358,13 +1370,14 @@
|
|
{
|
|
int ret = 0;
|
|
extern OpenFiles_T *pDev;
|
|
+ extern changer_t chg; /* Needed for the infos about havebarcode */
|
|
|
|
DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### START BarCode\n");
|
|
DebugPrint(DEBUG_INFO, SECTION_BARCODE,"%-20s : fd %d\n", "BarCode", fd);
|
|
|
|
DebugPrint(DEBUG_INFO, SECTION_BARCODE,"Ident = [%s], function = [%s]\n", pDev[fd].ident,
|
|
pDev[fd].functions->ident);
|
|
- ret = pDev[fd].functions->function_barcode(fd);
|
|
+ ret = (pDev[fd].functions->function_barcode(fd) | chg.havebarcode);
|
|
DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### STOP BarCode (%d)\n",ret);
|
|
return(ret);
|
|
}
|
|
@@ -3770,7 +3783,7 @@
|
|
barcode,
|
|
V2(pEAAPage->MediumTransportElementAddress),
|
|
MTE+1,
|
|
- sizeof(MediumTransportElementDescriptor_T),
|
|
+ 0, /* let the buffer auto-size */
|
|
(char **)&DataBuffer) != 0)
|
|
{
|
|
if (DataBuffer != 0)
|
|
@@ -3855,7 +3868,7 @@
|
|
barcode,
|
|
V2(pEAAPage->FirstStorageElementAddress),
|
|
STE,
|
|
- sizeof(StorageElementDescriptor_T),
|
|
+ 0, /* let the buffer auto-size */
|
|
(char **)&DataBuffer) != 0)
|
|
{
|
|
if (DataBuffer != 0)
|
|
@@ -3942,7 +3955,7 @@
|
|
barcode,
|
|
V2(pEAAPage->FirstImportExportElementAddress),
|
|
IEE,
|
|
- sizeof(ImportExportElementDescriptor_T),
|
|
+ 0, /* let the buffer auto-size */
|
|
(char **)&DataBuffer) != 0)
|
|
{
|
|
if (DataBuffer != 0)
|
|
@@ -4027,7 +4040,7 @@
|
|
barcode,
|
|
V2(pEAAPage->FirstDataTransferElementAddress),
|
|
DTE,
|
|
- sizeof(DataTransferElementDescriptor_T),
|
|
+ 0, /* let the buffer auto-size */
|
|
(char **)&DataBuffer) != 0)
|
|
{
|
|
if (DataBuffer != 0)
|