Lines 1-5
Link Here
|
1 |
--- os_freebsd.cpp.orig 2008-03-04 23:09:47.000000000 +0100 |
1 |
|
2 |
+++ os_freebsd.cpp 2008-03-14 13:52:37.000000000 +0100 |
2 |
$FreeBSD$ |
|
|
3 |
|
4 |
--- os_freebsd.cpp.orig |
5 |
+++ os_freebsd.cpp |
3 |
@@ -272,7 +272,6 @@ |
6 |
@@ -272,7 +272,6 @@ |
4 |
} |
7 |
} |
5 |
|
8 |
|
Lines 8-23
Link Here
|
8 |
return -1; |
11 |
return -1; |
9 |
} |
12 |
} |
10 |
|
13 |
|
11 |
@@ -525,7 +524,7 @@ |
14 |
@@ -341,6 +340,15 @@ |
|
|
15 |
request.count=512; |
16 |
copydata=1; |
17 |
break; |
18 |
+ case WRITE_LOG: |
19 |
+ memcpy(buff, data, 512); |
20 |
+ request.u.ata.feature=ATA_SMART_WRITE_LOG_SECTOR; |
21 |
+ request.u.ata.lba=select|(0xc24f<<8); |
22 |
+ request.u.ata.count=1; |
23 |
+ request.flags=ATA_CMD_WRITE; |
24 |
+ request.data=(char *)buff; |
25 |
+ request.count=512; |
26 |
+ break; |
27 |
case IDENTIFY: |
28 |
request.u.ata.command=ATA_IDENTIFY_DEVICE; |
29 |
request.flags=ATA_CMD_READ; |
30 |
@@ -525,7 +533,7 @@ |
12 |
return -1; |
31 |
return -1; |
13 |
} |
32 |
} |
14 |
|
33 |
|
15 |
- if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { |
34 |
- if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { |
16 |
+ if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) { |
35 |
+ if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) { |
17 |
#if __FreeBSD_version > 500000 |
36 |
#if __FreeBSD_version > 500000 |
18 |
cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); |
37 |
cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); |
19 |
#endif |
38 |
#endif |
20 |
@@ -924,6 +923,7 @@ |
39 |
@@ -924,6 +932,7 @@ |
21 |
static const char * fbsd_dev_prefix = "/dev/"; |
40 |
static const char * fbsd_dev_prefix = "/dev/"; |
22 |
static const char * fbsd_dev_ata_disk_prefix = "ad"; |
41 |
static const char * fbsd_dev_ata_disk_prefix = "ad"; |
23 |
static const char * fbsd_dev_scsi_disk_plus = "da"; |
42 |
static const char * fbsd_dev_scsi_disk_plus = "da"; |
Lines 25-31
Link Here
|
25 |
static const char * fbsd_dev_scsi_tape1 = "sa"; |
44 |
static const char * fbsd_dev_scsi_tape1 = "sa"; |
26 |
static const char * fbsd_dev_scsi_tape2 = "nsa"; |
45 |
static const char * fbsd_dev_scsi_tape2 = "nsa"; |
27 |
static const char * fbsd_dev_scsi_tape3 = "esa"; |
46 |
static const char * fbsd_dev_scsi_tape3 = "esa"; |
28 |
@@ -960,6 +960,11 @@ |
47 |
@@ -960,6 +969,11 @@ |
29 |
return CONTROLLER_ATA; |
48 |
return CONTROLLER_ATA; |
30 |
} |
49 |
} |