mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Reorder the minimum_cmd_size code to make it a little smaller and
easier to read.
This commit is contained in:
parent
28ffa76673
commit
fb2cec6f53
1 changed files with 8 additions and 10 deletions
|
|
@ -2500,17 +2500,15 @@ daregister(struct cam_periph *periph, void *arg)
|
|||
/*
|
||||
* 6, 10, 12 and 16 are the currently permissible values.
|
||||
*/
|
||||
if (softc->minimum_cmd_size < 6)
|
||||
softc->minimum_cmd_size = 6;
|
||||
else if ((softc->minimum_cmd_size > 6)
|
||||
&& (softc->minimum_cmd_size <= 10))
|
||||
softc->minimum_cmd_size = 10;
|
||||
else if ((softc->minimum_cmd_size > 10)
|
||||
&& (softc->minimum_cmd_size <= 12))
|
||||
softc->minimum_cmd_size = 12;
|
||||
else if (softc->minimum_cmd_size > 12)
|
||||
if (softc->minimum_cmd_size > 12)
|
||||
softc->minimum_cmd_size = 16;
|
||||
|
||||
else if (softc->minimum_cmd_size > 10)
|
||||
softc->minimum_cmd_size = 12;
|
||||
else if (softc->minimum_cmd_size > 6)
|
||||
softc->minimum_cmd_size = 10;
|
||||
else
|
||||
softc->minimum_cmd_size = 6;
|
||||
|
||||
/* Predict whether device may support READ CAPACITY(16). */
|
||||
if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 &&
|
||||
(softc->quirks & DA_Q_NO_RC16) == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue