* get_emulation_buffer(): Don't replace the request data. Both callers
(scsi_start_mode_sense_6(), scsi_start_mode_select_6()) also call replace_request_data(), which does the same. Therefore the original request data were lost. scsi_start_mode_select_6() also copied the wrong data due to this. * scsi_finish_mode_sense_10_6(): In case of error also call restore_request_data() to restore the request data. Fixes #5855 -- since the request data length was changed, unlock_memory() was called with a different length than lock_memory(), thus triggering the panic(). After starting CDPlayer the syslog is still spammed with failing requests, so obviously something is still not OK. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36539 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4dc89bc259
commit
523d310585
@ -308,6 +308,7 @@ scsi_finish_mode_sense_10_6(scsi_ccb *request)
|
||||
if (request->subsys_status != SCSI_REQ_CMP
|
||||
|| request->device_status != SCSI_STATUS_GOOD) {
|
||||
// on error, do nothing
|
||||
restore_request_data(request);
|
||||
release_emulation_buffer(request);
|
||||
return;
|
||||
}
|
||||
@ -517,14 +518,6 @@ get_emulation_buffer(scsi_ccb *request)
|
||||
SHOW_FLOW0(3, "");
|
||||
|
||||
acquire_sem(device->buffer_sem);
|
||||
|
||||
request->orig_sg_list = request->sg_list;
|
||||
request->orig_sg_count = request->sg_count;
|
||||
request->orig_data_length = request->data_length;
|
||||
|
||||
request->sg_list = device->buffer_sg_list;
|
||||
request->sg_count = device->buffer_sg_count;
|
||||
request->data_length = device->buffer_size;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user