On Wed, 2006-03-29 at 22:23 +0200, Ingo Flaschberger wrote: > When you mean: > if ((bflags & BLIST_NOREPORTLUN) || > starget->scsi_level < SCSI_2 || > ((starget->scsi_level < SCSI_3 || > starget->scsi_level == SCSI_UNKNOWN) && > (!(bflags & BLIST_REPORTLUN2) || shost->max_lun <= 8)) ) > return 1; > That also hits return. Then invert the SCSI2 test (starget->scsi_level < SCSI_2 && starget->scsi_level != SCSI_UNKNOWN). > I'm also afraid the trigger other problems whith SCSI_UNKNOWN so I suggest > this: > > if ((bflags & BLIST_NOREPORTLUN) || > ((starget->scsi_level < SCSI_2) && > !(bflags & BLIST_REPORTLUN0)) || > ((starget->scsi_level < SCSI_3) && > (!((bflags & BLIST_REPORTLUN2) || (bflags & BLIST_REPORTLUN0)) > || shost->max_lun <= 8)) ) > return 1; The issue is that I think we can do this without any extra blacklist flags at all ... that's the goal as I see it. The test for Unknown should also be in the cdb modifier case, since that only needs to be done for SCSI-2 and SCSI-1 James - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html