scsi: Use not C++ style comments // but C-style comments /* */
Change-Id: I44c1b5c68ddb56aca2ad46471753d6835dd744a5 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/431079 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
This commit is contained in:
parent
472b2cfcf8
commit
65e5bbdc05
@ -1221,7 +1221,7 @@ spdk_bdev_scsi_mode_select_page(struct spdk_bdev *bdev,
|
||||
|
||||
switch (page) {
|
||||
case 0x08: { /* Caching */
|
||||
//int wce;
|
||||
/* int wce; */
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "MODE_SELECT Caching\n");
|
||||
if (subpage != 0x00) {
|
||||
@ -1233,22 +1233,24 @@ spdk_bdev_scsi_mode_select_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO:
|
||||
//wce = data[2] & 0x4; /* WCE */
|
||||
/* TODO: */
|
||||
#if 0
|
||||
wce = data[2] & 0x4; /* WCE */
|
||||
|
||||
//fd = bdev->fd;
|
||||
//
|
||||
//rc = fcntl(fd, F_GETFL, 0);
|
||||
//if (rc != -1) {
|
||||
// if (wce) {
|
||||
// SPDK_DEBUGLOG(SPDK_LOG_SCSI, "MODE_SELECT Writeback cache enable\n");
|
||||
// rc = fcntl(fd, F_SETFL, (rc & ~O_FSYNC));
|
||||
// bdev->write_cache = 1;
|
||||
// } else {
|
||||
// rc = fcntl(fd, F_SETFL, (rc | O_FSYNC));
|
||||
// bdev->write_cache = 0;
|
||||
// }
|
||||
//}
|
||||
fd = bdev->fd;
|
||||
|
||||
rc = fcntl(fd, F_GETFL, 0);
|
||||
if (rc != -1) {
|
||||
if (wce) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "MODE_SELECT Writeback cache enable\n");
|
||||
rc = fcntl(fd, F_SETFL, (rc & ~O_FSYNC));
|
||||
bdev->write_cache = 1;
|
||||
} else {
|
||||
rc = fcntl(fd, F_SETFL, (rc | O_FSYNC));
|
||||
bdev->write_cache = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -476,8 +476,8 @@ inquiry_evpd_test(void)
|
||||
ut_init_task(&task);
|
||||
|
||||
cdb[0] = 0x12;
|
||||
cdb[1] = 0x00; // EVPD = 0
|
||||
cdb[2] = 0xff; // PageCode non-zero
|
||||
cdb[1] = 0x00; /* EVPD = 0 */
|
||||
cdb[2] = 0xff; /* PageCode non-zero */
|
||||
cdb[3] = 0x00;
|
||||
cdb[4] = 0xff;
|
||||
cdb[5] = 0x00;
|
||||
@ -518,10 +518,10 @@ inquiry_standard_test(void)
|
||||
ut_init_task(&task);
|
||||
|
||||
cdb[0] = 0x12;
|
||||
cdb[1] = 0x00; // EVPD = 0
|
||||
cdb[2] = 0x00; // PageCode zero - requesting standard inquiry
|
||||
cdb[1] = 0x00; /* EVPD = 0 */
|
||||
cdb[2] = 0x00; /* PageCode zero - requesting standard inquiry */
|
||||
cdb[3] = 0x00;
|
||||
cdb[4] = 0xff; // Indicate data size used by conformance test
|
||||
cdb[4] = 0xff; /* Indicate data size used by conformance test */
|
||||
cdb[5] = 0x00;
|
||||
task.cdb = cdb;
|
||||
|
||||
@ -556,10 +556,10 @@ _inquiry_overflow_test(uint8_t alloc_len)
|
||||
ut_init_task(&task);
|
||||
|
||||
cdb[0] = 0x12;
|
||||
cdb[1] = 0x00; // EVPD = 0
|
||||
cdb[2] = 0x00; // PageCode zero - requesting standard inquiry
|
||||
cdb[1] = 0x00; /* EVPD = 0 */
|
||||
cdb[2] = 0x00; /* PageCode zero - requesting standard inquiry */
|
||||
cdb[3] = 0x00;
|
||||
cdb[4] = alloc_len; // Indicate data size used by conformance test
|
||||
cdb[4] = alloc_len; /* Indicate data size used by conformance test */
|
||||
cdb[5] = 0x00;
|
||||
task.cdb = cdb;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user