1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Sync with the spl changes in -stable.

Add start of support for DVD+RW.
This commit is contained in:
Søren Schmidt 2002-07-22 18:36:14 +00:00
parent 2dadf47412
commit 5c0d1ab990
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100525
2 changed files with 6 additions and 2 deletions

View File

@ -199,15 +199,17 @@ atapi_queue_cmd(struct ata_device *atadev, int8_t *ccb, caddr_t data,
TAILQ_INSERT_HEAD(&atadev->channel->atapi_queue, request, chain); TAILQ_INSERT_HEAD(&atadev->channel->atapi_queue, request, chain);
else else
TAILQ_INSERT_TAIL(&atadev->channel->atapi_queue, request, chain); TAILQ_INSERT_TAIL(&atadev->channel->atapi_queue, request, chain);
splx(s);
ata_start(atadev->channel); ata_start(atadev->channel);
/* if callback used, then just return, gets called from interrupt context */ /* if callback used, then just return, gets called from interrupt context */
if (callback) if (callback) {
splx(s);
return 0; return 0;
}
/* wait for request to complete */ /* wait for request to complete */
tsleep((caddr_t)request, PRIBIO, "atprq", 0); tsleep((caddr_t)request, PRIBIO, "atprq", 0);
splx(s);
error = request->error; error = request->error;
if (error) if (error)
bcopy(&request->sense, atadev->result, sizeof(struct atapi_reqsense)); bcopy(&request->sense, atadev->result, sizeof(struct atapi_reqsense));
@ -660,6 +662,7 @@ atapi_cmd2str(u_int8_t cmd)
case 0x1a: return ("MODE_SENSE"); case 0x1a: return ("MODE_SENSE");
case 0x1b: return ("START_STOP"); case 0x1b: return ("START_STOP");
case 0x1e: return ("PREVENT_ALLOW"); case 0x1e: return ("PREVENT_ALLOW");
case 0x23: return ("ATAPI_READ_FORMAT_CAPACITIES");
case 0x25: return ("READ_CAPACITY"); case 0x25: return ("READ_CAPACITY");
case 0x28: return ("READ_BIG"); case 0x28: return ("READ_BIG");
case 0x2a: return ("WRITE_BIG"); case 0x2a: return ("WRITE_BIG");

View File

@ -82,6 +82,7 @@
#define SS_RETENSION 0x02 #define SS_RETENSION 0x02
#define SS_EJECT 0x04 #define SS_EJECT 0x04
#define ATAPI_PREVENT_ALLOW 0x1e /* media removal */ #define ATAPI_PREVENT_ALLOW 0x1e /* media removal */
#define ATAPI_READ_FORMAT_CAPACITIES 0x23 /* get format capacities */
#define ATAPI_READ_CAPACITY 0x25 /* get volume capacity */ #define ATAPI_READ_CAPACITY 0x25 /* get volume capacity */
#define ATAPI_READ_BIG 0x28 /* read data */ #define ATAPI_READ_BIG 0x28 /* read data */
#define ATAPI_WRITE_BIG 0x2a /* write data */ #define ATAPI_WRITE_BIG 0x2a /* write data */