search for: badf

Displaying 4 results from an estimated 4 matches for "badf".

Did you mean: bad
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...v.iov_len); + r->bus->complete(r->bus, SCSI_REASON_DATA, r->tag, r->iov->iov_len); } /* Read more data from scsi device into buffer. */ @@ -205,19 +220,18 @@ static void scsi_read_data(SCSIDevice *d, uint32_t tag) r = scsi_find_request(s, tag); if (!r) { BADF("Bad read tag 0x%x\n", tag); - /* ??? This is the wrong error. */ - scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR); + scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_TAG_NOT_FOUND); return; } if (r->sector_count ==...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...v.iov_len); + r->bus->complete(r->bus, SCSI_REASON_DATA, r->tag, r->iov->iov_len); } /* Read more data from scsi device into buffer. */ @@ -205,19 +220,18 @@ static void scsi_read_data(SCSIDevice *d, uint32_t tag) r = scsi_find_request(s, tag); if (!r) { BADF("Bad read tag 0x%x\n", tag); - /* ??? This is the wrong error. */ - scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR); + scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_TAG_NOT_FOUND); return; } if (r->sector_count ==...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
....h" +#ifdef __linux__ +# include <scsi/sg.h> +#endif + +#undef DEBUG_MEGASAS +#undef DEBUG_MEGASAS_REG +#undef DEBUG_MEGASAS_QUEUE +#undef DEBUG_MEGASAS_MFI + +#ifdef DEBUG_MEGASAS +#define DPRINTF(fmt, ...) \ +do { printf("megasas: " fmt , ## __VA_ARGS__); } while (0) +#define BADF(fmt, ...) \ +do { fprintf(stderr, "megasas: error: " fmt , ## __VA_ARGS__); exit(1);} while (0) +#else +#define DPRINTF(fmt, ...) do {} while(0) +#define BADF(fmt, ...) \ +do { fprintf(stderr, "megasas: error: " fmt , ## __VA_ARGS__);} while (0) +#endif + +/* Static definitions...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
....h" +#ifdef __linux__ +# include <scsi/sg.h> +#endif + +#undef DEBUG_MEGASAS +#undef DEBUG_MEGASAS_REG +#undef DEBUG_MEGASAS_QUEUE +#undef DEBUG_MEGASAS_MFI + +#ifdef DEBUG_MEGASAS +#define DPRINTF(fmt, ...) \ +do { printf("megasas: " fmt , ## __VA_ARGS__); } while (0) +#define BADF(fmt, ...) \ +do { fprintf(stderr, "megasas: error: " fmt , ## __VA_ARGS__); exit(1);} while (0) +#else +#define DPRINTF(fmt, ...) do {} while(0) +#define BADF(fmt, ...) \ +do { fprintf(stderr, "megasas: error: " fmt , ## __VA_ARGS__);} while (0) +#endif + +/* Static definitions...