diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cam/scsi/scsi_all.c | 32 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_all.h | 13 | ||||
-rw-r--r-- | sys/dev/sound/midi/midi.c | 17 | ||||
-rw-r--r-- | sys/kern/kern_procctl.c | 2 | ||||
-rw-r--r-- | sys/netpfil/pf/pf_if.c | 2 |
5 files changed, 57 insertions, 9 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 25c5451..4013ff8 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -8419,6 +8419,38 @@ scsi_security_protocol_out(struct ccb_scsiio *csio, uint32_t retries, timeout); } +void +scsi_report_supported_opcodes(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, int options, int req_opcode, + int req_service_action, uint8_t *data_ptr, + uint32_t dxfer_len, int sense_len, int timeout) +{ + struct scsi_report_supported_opcodes *scsi_cmd; + + scsi_cmd = (struct scsi_report_supported_opcodes *) + &csio->cdb_io.cdb_bytes; + bzero(scsi_cmd, sizeof(*scsi_cmd)); + + scsi_cmd->opcode = MAINTENANCE_IN; + scsi_cmd->service_action = REPORT_SUPPORTED_OPERATION_CODES; + scsi_cmd->options = options; + scsi_cmd->requested_opcode = req_opcode; + scsi_ulto2b(req_service_action, scsi_cmd->requested_service_action); + scsi_ulto4b(dxfer_len, scsi_cmd->length); + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/CAM_DIR_IN, + tag_action, + data_ptr, + dxfer_len, + sense_len, + sizeof(*scsi_cmd), + timeout); +} + /* * Try make as good a match as possible with * available sub drivers diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index e446f6c..253e28e 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -1457,6 +1457,11 @@ struct scsi_report_supported_opcodes_one uint8_t reserved; uint8_t support; #define RSO_ONE_CTDP 0x80 +#define RSO_ONE_SUP_MASK 0x07 +#define RSO_ONE_SUP_UNAVAIL 0x00 +#define RSO_ONE_SUP_NOT_SUP 0x01 +#define RSO_ONE_SUP_AVAIL 0x03 +#define RSO_ONE_SUP_VENDOR 0x05 uint8_t cdb_length[2]; uint8_t cdb_usage[]; }; @@ -3967,6 +3972,14 @@ void scsi_persistent_reserve_out(struct ccb_scsiio *csio, uint32_t retries, uint32_t dxfer_len, int sense_len, int timeout); +void scsi_report_supported_opcodes(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, + union ccb *), + uint8_t tag_action, int options, + int req_opcode, int req_service_action, + uint8_t *data_ptr, uint32_t dxfer_len, + int sense_len, int timeout); + int scsi_inquiry_match(caddr_t inqbuffer, caddr_t table_entry); int scsi_static_inquiry_match(caddr_t inqbuffer, caddr_t table_entry); diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 964e1bd..5537d62 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -86,7 +86,7 @@ enum midi_states { }; /* - * The MPU interface current has init() uninit() inqsize(( outqsize() + * The MPU interface current has init() uninit() inqsize() outqsize() * callback() : fiddle with the tx|rx status. */ @@ -160,10 +160,15 @@ DEFINE_CLASS(midisynth, midisynth_methods, 0); /* * Module Exports & Interface * - * struct midi_chan *midi_init(MPU_CLASS cls, int unit, int chan) int - * midi_uninit(struct snd_midi *) 0 == no error EBUSY or other error int - * Midi_in(struct midi_chan *, char *buf, int count) int Midi_out(struct - * midi_chan *, char *buf, int count) + * struct midi_chan *midi_init(MPU_CLASS cls, int unit, int chan, + * void *cookie) + * int midi_uninit(struct snd_midi *) + * + * 0 == no error + * EBUSY or other error + * + * int midi_in(struct snd_midi *, char *buf, int count) + * int midi_out(struct snd_midi *, char *buf, int count) * * midi_{in,out} return actual size transfered * @@ -388,7 +393,7 @@ err0: mtx_unlock(&midistat_lock); /* * midi_uninit does not call MIDI_UNINIT, as since this is the implementors - * entry point. midi_unint if fact, does not send any methods. A call to + * entry point. midi_uninit if fact, does not send any methods. A call to * midi_uninit is a defacto promise that you won't manipulate ch anymore * */ diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 734c871..e6e432e 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -187,8 +187,6 @@ reap_status(struct thread *td, struct proc *p, } } else { rs->rs_pid = -1; - KASSERT(LIST_EMPTY(&reap->p_reaplist), ("reap children list")); - KASSERT(LIST_EMPTY(&reap->p_children), ("children list")); } return (0); } diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index 91fbeb8..d1214fa 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -578,7 +578,7 @@ pfi_address_add(struct sockaddr *sa, int af, int net) __func__, V_pfi_buffer_cnt, PFI_BUFFER_MAX); return; } - memcpy(V_pfi_buffer, p, V_pfi_buffer_cnt * sizeof(*V_pfi_buffer)); + memcpy(p, V_pfi_buffer, V_pfi_buffer_max * sizeof(*V_pfi_buffer)); /* no need to zero buffer */ free(V_pfi_buffer, PFI_MTYPE); V_pfi_buffer = p; |