- remove unused variables

- move variables inside ifdef sections
- ifdef notdef unused code
- use __USE for debugging variables
This commit is contained in:
christos 2013-10-17 21:24:24 +00:00
parent 1f73a688da
commit b787afbfb6
16 changed files with 105 additions and 96 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic79xx.c,v 1.45 2011/07/02 13:12:44 mrg Exp $ */ /* $NetBSD: aic79xx.c,v 1.46 2013/10/17 21:24:24 christos Exp $ */
/* /*
* Core routines and tables shareable across OS platforms. * Core routines and tables shareable across OS platforms.
@ -49,7 +49,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.45 2011/07/02 13:12:44 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.46 2013/10/17 21:24:24 christos Exp $");
#include <dev/ic/aic79xx_osm.h> #include <dev/ic/aic79xx_osm.h>
#include <dev/ic/aic79xx_inline.h> #include <dev/ic/aic79xx_inline.h>
@ -1025,9 +1025,10 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
{ {
struct ahd_devinfo devinfo; struct ahd_devinfo devinfo;
struct scb *scb; struct scb *scb;
#ifdef notdef
struct ahd_initiator_tinfo *targ_info; struct ahd_initiator_tinfo *targ_info;
struct ahd_tmode_tstate *tstate; struct ahd_tmode_tstate *tstate;
struct ahd_transinfo *tinfo; #endif
u_int scbid; u_int scbid;
/* /*
@ -1055,12 +1056,13 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
SCB_GET_LUN(scb), SCB_GET_LUN(scb),
SCB_GET_CHANNEL(ahd, scb), SCB_GET_CHANNEL(ahd, scb),
ROLE_INITIATOR); ROLE_INITIATOR);
#ifdef notdef
targ_info = ahd_fetch_transinfo(ahd, targ_info = ahd_fetch_transinfo(ahd,
devinfo.channel, devinfo.channel,
devinfo.our_scsiid, devinfo.our_scsiid,
devinfo.target, devinfo.target,
&tstate); &tstate);
tinfo = &targ_info->curr; #endif
ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
AHD_TRANS_ACTIVE, /*paused*/TRUE); AHD_TRANS_ACTIVE, /*paused*/TRUE);
ahd_set_syncrate(ahd, &devinfo, /*period*/0, ahd_set_syncrate(ahd, &devinfo, /*period*/0,
@ -1747,7 +1749,6 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
struct scb *scb; struct scb *scb;
u_int scbid; u_int scbid;
u_int lqistat1; u_int lqistat1;
u_int lqistat2;
u_int msg_out; u_int msg_out;
u_int curphase; u_int curphase;
u_int lastphase; u_int lastphase;
@ -1758,7 +1759,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
scb = NULL; scb = NULL;
ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ); lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ);
lqistat2 = ahd_inb(ahd, LQISTAT2); (void)ahd_inb(ahd, LQISTAT2);
if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0 if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0
&& (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) { && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) {
u_int lqistate; u_int lqistate;
@ -2657,10 +2658,8 @@ ahd_dump_sglist(struct scb *scb)
sg_list = (struct ahd_dma64_seg*)scb->sg_list; sg_list = (struct ahd_dma64_seg*)scb->sg_list;
for (i = 0; i < scb->sg_count; i++) { for (i = 0; i < scb->sg_count; i++) {
uint64_t addr; uint64_t addr;
uint32_t len;
addr = ahd_le64toh(sg_list[i].addr); addr = ahd_le64toh(sg_list[i].addr);
len = ahd_le32toh(sg_list[i].len);
printf("sg[%d] - Addr 0x%x%x : Length %d%s\n", printf("sg[%d] - Addr 0x%x%x : Length %d%s\n",
i, i,
(uint32_t)((addr >> 32) & 0xFFFFFFFF), (uint32_t)((addr >> 32) & 0xFFFFFFFF),
@ -3288,13 +3287,12 @@ ahd_update_pending_scbs(struct ahd_softc *ahd)
LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) {
struct ahd_devinfo devinfo; struct ahd_devinfo devinfo;
struct hardware_scb *pending_hscb; struct hardware_scb *pending_hscb;
struct ahd_initiator_tinfo *tinfo;
struct ahd_tmode_tstate *tstate; struct ahd_tmode_tstate *tstate;
ahd_scb_devinfo(ahd, &devinfo, pending_scb); ahd_scb_devinfo(ahd, &devinfo, pending_scb);
tinfo = ahd_fetch_transinfo(ahd, devinfo.channel, (void)ahd_fetch_transinfo(ahd, devinfo.channel,
devinfo.our_scsiid, devinfo.our_scsiid,
devinfo.target, &tstate); devinfo.target, &tstate);
pending_hscb = pending_scb->hscb; pending_hscb = pending_scb->hscb;
if ((tstate->auto_negotiate & devinfo.target_mask) == 0 if ((tstate->auto_negotiate & devinfo.target_mask) == 0
&& (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) { && (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) {
@ -7127,7 +7125,6 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel,
int found; int found;
int targets; int targets;
int pending_cmds; int pending_cmds;
int qincount;
/* Must be in CCHAN mode */ /* Must be in CCHAN mode */
saved_modes = ahd_save_modes(ahd); saved_modes = ahd_save_modes(ahd);
@ -7155,7 +7152,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel,
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) { LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
pending_cmds++; pending_cmds++;
} }
qincount = ahd_qinfifo_count(ahd); (void)ahd_qinfifo_count(ahd);
if (action == SEARCH_PRINT) { if (action == SEARCH_PRINT) {
printf("qinstart = 0x%x qinfifonext = 0x%x\n", printf("qinstart = 0x%x qinfifonext = 0x%x\n",
@ -7953,7 +7950,6 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
struct scsi_request_sense *sc; struct scsi_request_sense *sc;
struct ahd_initiator_tinfo *targ_info; struct ahd_initiator_tinfo *targ_info;
struct ahd_tmode_tstate *tstate; struct ahd_tmode_tstate *tstate;
struct ahd_transinfo *tinfo;
#ifdef AHD_DEBUG #ifdef AHD_DEBUG
if (ahd_debug & AHD_SHOW_SENSE) { if (ahd_debug & AHD_SHOW_SENSE) {
ahd_print_path(ahd, scb); ahd_print_path(ahd, scb);
@ -7975,7 +7971,6 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
devinfo.our_scsiid, devinfo.our_scsiid,
devinfo.target, devinfo.target,
&tstate); &tstate);
tinfo = &targ_info->curr;
sg = scb->sg_list; sg = scb->sg_list;
sc = (struct scsi_request_sense *)hscb->shared_data.idata.cdb; sc = (struct scsi_request_sense *)hscb->shared_data.idata.cdb;
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic79xx_osm.c,v 1.31 2010/02/24 22:37:57 dyoung Exp $ */ /* $NetBSD: aic79xx_osm.c,v 1.32 2013/10/17 21:24:24 christos Exp $ */
/* /*
* Bus independent NetBSD shim for the aic7xxx based adaptec SCSI controllers * Bus independent NetBSD shim for the aic7xxx based adaptec SCSI controllers
@ -41,7 +41,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.31 2010/02/24 22:37:57 dyoung Exp $"); __KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.32 2013/10/17 21:24:24 christos Exp $");
#include <dev/ic/aic79xx_osm.h> #include <dev/ic/aic79xx_osm.h>
#include <dev/ic/aic79xx_inline.h> #include <dev/ic/aic79xx_inline.h>
@ -739,7 +739,6 @@ ahd_timeout(void *arg)
{ {
struct scb *scb; struct scb *scb;
struct ahd_softc *ahd; struct ahd_softc *ahd;
ahd_mode_state saved_modes;
int s; int s;
scb = arg; scb = arg;
@ -750,7 +749,7 @@ ahd_timeout(void *arg)
ahd_lock(ahd, &s); ahd_lock(ahd, &s);
ahd_pause_and_flushwork(ahd); ahd_pause_and_flushwork(ahd);
saved_modes = ahd_save_modes(ahd); (void)ahd_save_modes(ahd);
#if 0 #if 0
ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
ahd_outb(ahd, SCSISIGO, ACKO); ahd_outb(ahd, SCSISIGO, ACKO);

View File

@ -1,4 +1,4 @@
/* $NetBSD: arn5008.c,v 1.3 2013/04/06 14:57:38 martin Exp $ */ /* $NetBSD: arn5008.c,v 1.4 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: ar5008.c,v 1.21 2012/08/25 12:14:31 kettenis Exp $ */ /* $OpenBSD: ar5008.c,v 1.21 2012/08/25 12:14:31 kettenis Exp $ */
/*- /*-
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.3 2013/04/06 14:57:38 martin Exp $"); __KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.4 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/sockio.h> #include <sys/sockio.h>
@ -1181,7 +1181,7 @@ ar5008_swba_intr(struct athn_softc *sc)
Static int Static int
ar5008_intr(struct athn_softc *sc) ar5008_intr(struct athn_softc *sc)
{ {
uint32_t intr, intr2, intr5, sync; uint32_t intr, intr5, sync;
/* Get pending interrupts. */ /* Get pending interrupts. */
intr = AR_READ(sc, AR_INTR_ASYNC_CAUSE); intr = AR_READ(sc, AR_INTR_ASYNC_CAUSE);
@ -1202,12 +1202,14 @@ ar5008_intr(struct athn_softc *sc)
if (intr != 0) { if (intr != 0) {
if (intr & AR_ISR_BCNMISC) { if (intr & AR_ISR_BCNMISC) {
intr2 = AR_READ(sc, AR_ISR_S2); uint32_t intr2 = AR_READ(sc, AR_ISR_S2);
#if notyet #if notyet
if (intr2 & AR_ISR_S2_TIM) if (intr2 & AR_ISR_S2_TIM)
/* TBD */; /* TBD */;
if (intr2 & AR_ISR_S2_TSFOOR) if (intr2 & AR_ISR_S2_TSFOOR)
/* TBD */; /* TBD */;
#else
__USE(intr2);
#endif #endif
} }
intr = AR_READ(sc, AR_ISR_RAC); intr = AR_READ(sc, AR_ISR_RAC);

View File

@ -1,4 +1,4 @@
/* $NetBSD: arn9003.c,v 1.3 2013/04/06 14:57:38 martin Exp $ */ /* $NetBSD: arn9003.c,v 1.4 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: ar9003.c,v 1.25 2012/10/20 09:53:32 stsp Exp $ */ /* $OpenBSD: ar9003.c,v 1.25 2012/10/20 09:53:32 stsp Exp $ */
/*- /*-
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.3 2013/04/06 14:57:38 martin Exp $"); __KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.4 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/sockio.h> #include <sys/sockio.h>
@ -1339,7 +1339,7 @@ ar9003_swba_intr(struct athn_softc *sc)
Static int Static int
ar9003_intr(struct athn_softc *sc) ar9003_intr(struct athn_softc *sc)
{ {
uint32_t intr, intr2, intr5, sync; uint32_t intr, sync;
/* Get pending interrupts. */ /* Get pending interrupts. */
intr = AR_READ(sc, AR_INTR_ASYNC_CAUSE); intr = AR_READ(sc, AR_INTR_ASYNC_CAUSE);
@ -1360,7 +1360,7 @@ ar9003_intr(struct athn_softc *sc)
if (intr != 0) { if (intr != 0) {
if (intr & AR_ISR_BCNMISC) { if (intr & AR_ISR_BCNMISC) {
intr2 = AR_READ(sc, AR_ISR_S2); uint32_t intr2 = AR_READ(sc, AR_ISR_S2);
#ifdef notyet #ifdef notyet
if (intr2 & AR_ISR_S2_TIM) if (intr2 & AR_ISR_S2_TIM)
/* TBD */; /* TBD */;
@ -1368,6 +1368,8 @@ ar9003_intr(struct athn_softc *sc)
/* TBD */; /* TBD */;
if (intr2 & AR_ISR_S2_BB_WATCHDOG) if (intr2 & AR_ISR_S2_BB_WATCHDOG)
/* TBD */; /* TBD */;
#else
__USE(intr2);
#endif #endif
} }
intr = AR_READ(sc, AR_ISR_RAC); intr = AR_READ(sc, AR_ISR_RAC);
@ -1391,11 +1393,15 @@ ar9003_intr(struct athn_softc *sc)
ar9003_tx_intr(sc); ar9003_tx_intr(sc);
if (intr & AR_ISR_GENTMR) { if (intr & AR_ISR_GENTMR) {
intr5 = AR_READ(sc, AR_ISR_S5_S); uint32_t intr5 = AR_READ(sc, AR_ISR_S5_S);
#ifdef ATHN_DEBUG
DPRINTFN(DBG_INTR, sc, DPRINTFN(DBG_INTR, sc,
"GENTMR trigger=%d thresh=%d\n", "GENTMR trigger=%d thresh=%d\n",
MS(intr5, AR_ISR_S5_GENTIMER_TRIG), MS(intr5, AR_ISR_S5_GENTIMER_TRIG),
MS(intr5, AR_ISR_S5_GENTIMER_THRESH)); MS(intr5, AR_ISR_S5_GENTIMER_THRESH));
#else
__USE(intr5);
#endif
} }
} }
if (sync != 0) { if (sync != 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: arn9285.c,v 1.2 2013/04/03 14:20:02 christos Exp $ */ /* $NetBSD: arn9285.c,v 1.3 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: ar9285.c,v 1.19 2012/06/10 21:23:36 kettenis Exp $ */ /* $OpenBSD: ar9285.c,v 1.19 2012/06/10 21:23:36 kettenis Exp $ */
/*- /*-
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arn9285.c,v 1.2 2013/04/03 14:20:02 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: arn9285.c,v 1.3 2013/10/17 21:24:24 christos Exp $");
#ifndef _MODULE #ifndef _MODULE
#include "athn_usb.h" #include "athn_usb.h"
@ -794,21 +794,25 @@ ar9285_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c,
struct ieee80211_channel *extc) struct ieee80211_channel *extc)
{ {
const struct ar9285_eeprom *eep = sc->sc_eep; const struct ar9285_eeprom *eep = sc->sc_eep;
#ifdef notyet
const struct ar9285_modal_eep_header *modal = &eep->modalHeader; const struct ar9285_modal_eep_header *modal = &eep->modalHeader;
#endif
uint8_t tpow_cck[4], tpow_ofdm[4]; uint8_t tpow_cck[4], tpow_ofdm[4];
#ifndef IEEE80211_NO_HT #ifndef IEEE80211_NO_HT
uint8_t tpow_cck_ext[4], tpow_ofdm_ext[4]; uint8_t tpow_cck_ext[4], tpow_ofdm_ext[4];
uint8_t tpow_ht20[8], tpow_ht40[8]; uint8_t tpow_ht20[8], tpow_ht40[8];
uint8_t ht40inc; uint8_t ht40inc;
#endif #endif
int16_t max_ant_gain, power[ATHN_POWER_COUNT]; int16_t power[ATHN_POWER_COUNT];
int i; int i;
ar9285_set_power_calib(sc, c); ar9285_set_power_calib(sc, c);
#ifdef notyet
/* Compute transmit power reduction due to antenna gain. */ /* Compute transmit power reduction due to antenna gain. */
max_ant_gain = modal->antennaGain; uint16_t max_ant_gain = modal->antennaGain;
/* XXX */ /* XXX */
#endif
/* Get CCK target powers. */ /* Get CCK target powers. */
ar5008_get_lg_tpow(sc, c, AR_CTL_11B, eep->calTargetPowerCck, ar5008_get_lg_tpow(sc, c, AR_CTL_11B, eep->calTargetPowerCck,

View File

@ -1,4 +1,4 @@
/* $NetBSD: arn9287.c,v 1.2 2013/04/03 14:20:02 christos Exp $ */ /* $NetBSD: arn9287.c,v 1.3 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: ar9287.c,v 1.17 2012/06/10 21:23:36 kettenis Exp $ */ /* $OpenBSD: ar9287.c,v 1.17 2012/06/10 21:23:36 kettenis Exp $ */
/*- /*-
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arn9287.c,v 1.2 2013/04/03 14:20:02 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: arn9287.c,v 1.3 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/sockio.h> #include <sys/sockio.h>
@ -433,21 +433,25 @@ ar9287_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c,
struct ieee80211_channel *extc) struct ieee80211_channel *extc)
{ {
const struct ar9287_eeprom *eep = sc->sc_eep; const struct ar9287_eeprom *eep = sc->sc_eep;
#ifdef notyet
const struct ar9287_modal_eep_header *modal = &eep->modalHeader; const struct ar9287_modal_eep_header *modal = &eep->modalHeader;
#endif
uint8_t tpow_cck[4], tpow_ofdm[4]; uint8_t tpow_cck[4], tpow_ofdm[4];
#ifndef IEEE80211_NO_HT #ifndef IEEE80211_NO_HT
uint8_t tpow_cck_ext[4], tpow_ofdm_ext[4]; uint8_t tpow_cck_ext[4], tpow_ofdm_ext[4];
uint8_t tpow_ht20[8], tpow_ht40[8]; uint8_t tpow_ht20[8], tpow_ht40[8];
uint8_t ht40inc; uint8_t ht40inc;
#endif #endif
int16_t pwr = 0, max_ant_gain, power[ATHN_POWER_COUNT]; int16_t pwr = 0, power[ATHN_POWER_COUNT];
int i; int i;
ar9287_set_power_calib(sc, c); ar9287_set_power_calib(sc, c);
#ifdef notyet
/* Compute transmit power reduction due to antenna gain. */ /* Compute transmit power reduction due to antenna gain. */
max_ant_gain = MAX(modal->antennaGainCh[0], modal->antennaGainCh[1]); uint16_t max_ant_gain = MAX(modal->antennaGainCh[0], modal->antennaGainCh[1]);
/* XXX */ /* XXX */
#endif
/* /*
* Reduce scaled power by number of active chains to get per-chain * Reduce scaled power by number of active chains to get per-chain

View File

@ -1,4 +1,4 @@
/* $NetBSD: athn.c,v 1.6 2013/06/24 19:43:58 martin Exp $ */ /* $NetBSD: athn.c,v 1.7 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: athn.c,v 1.75 2013/01/14 09:50:31 jsing Exp $ */ /* $OpenBSD: athn.c,v 1.75 2013/01/14 09:50:31 jsing Exp $ */
/*- /*-
@ -23,7 +23,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.6 2013/06/24 19:43:58 martin Exp $"); __KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.7 2013/10/17 21:24:24 christos Exp $");
#ifndef _MODULE #ifndef _MODULE
#include "athn_usb.h" /* for NATHN_USB */ #include "athn_usb.h" /* for NATHN_USB */
@ -1941,7 +1941,7 @@ athn_set_sta_timers(struct athn_softc *sc)
struct ieee80211com *ic = &sc->sc_ic; struct ieee80211com *ic = &sc->sc_ic;
uint32_t tsfhi, tsflo, tsftu, reg; uint32_t tsfhi, tsflo, tsftu, reg;
uint32_t intval, next_tbtt, next_dtim; uint32_t intval, next_tbtt, next_dtim;
int dtim_period, dtim_count, rem_dtim_count; int dtim_period, rem_dtim_count;
tsfhi = AR_READ(sc, AR_TSF_U32); tsfhi = AR_READ(sc, AR_TSF_U32);
tsflo = AR_READ(sc, AR_TSF_L32); tsflo = AR_READ(sc, AR_TSF_L32);
@ -1958,10 +1958,10 @@ athn_set_sta_timers(struct athn_softc *sc)
dtim_period = 1; /* Assume all TIMs are DTIMs. */ dtim_period = 1; /* Assume all TIMs are DTIMs. */
#ifdef notyet #ifdef notyet
dtim_count = ic->ic_dtim_count; int dtim_count = ic->ic_dtim_count;
if (dtim_count >= dtim_period) /* Should not happen. */ if (dtim_count >= dtim_period) /* Should not happen. */
#endif
dtim_count = 0; /* Assume last TIM was a DTIM. */ dtim_count = 0; /* Assume last TIM was a DTIM. */
#endif
/* Compute number of remaining TIMs until next DTIM. */ /* Compute number of remaining TIMs until next DTIM. */
rem_dtim_count = 0; /* XXX */ rem_dtim_count = 0; /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: atw.c,v 1.154 2013/09/14 13:10:25 joerg Exp $ */ /* $NetBSD: atw.c,v 1.155 2013/10/17 21:24:24 christos Exp $ */
/*- /*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.154 2013/09/14 13:10:25 joerg Exp $"); __KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.155 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -902,7 +902,6 @@ void
atw_reset(struct atw_softc *sc) atw_reset(struct atw_softc *sc)
{ {
int i; int i;
uint32_t lpc;
ATW_WRITE(sc, ATW_NAR, 0x0); ATW_WRITE(sc, ATW_NAR, 0x0);
DELAY(atw_nar_delay); DELAY(atw_nar_delay);
@ -949,7 +948,7 @@ atw_reset(struct atw_softc *sc)
DELAY(atw_magic_delay4); DELAY(atw_magic_delay4);
lpc = ATW_READ(sc, ATW_LPC); (void)ATW_READ(sc, ATW_LPC);
DPRINTF(sc, ("%s: ATW_LPC %#08x\n", __func__, lpc)); DPRINTF(sc, ("%s: ATW_LPC %#08x\n", __func__, lpc));
@ -2474,10 +2473,8 @@ atw_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
{ {
struct ifnet *ifp = ic->ic_ifp; struct ifnet *ifp = ic->ic_ifp;
struct atw_softc *sc = ifp->if_softc; struct atw_softc *sc = ifp->if_softc;
enum ieee80211_state ostate;
int error = 0; int error = 0;
ostate = ic->ic_state;
callout_stop(&sc->sc_scan_ch); callout_stop(&sc->sc_scan_ch);
switch (nstate) { switch (nstate) {
@ -3452,7 +3449,7 @@ atw_start(struct ifnet *ifp)
struct atw_frame *hh; struct atw_frame *hh;
uint16_t hdrctl; uint16_t hdrctl;
struct mbuf *m0, *m; struct mbuf *m0, *m;
struct atw_txsoft *txs, *last_txs; struct atw_txsoft *txs;
struct atw_txdesc *txd; struct atw_txdesc *txd;
int npkt, rate; int npkt, rate;
bus_dmamap_t dmamap; bus_dmamap_t dmamap;
@ -3805,8 +3802,6 @@ atw_start(struct ifnet *ifp)
SIMPLEQ_REMOVE_HEAD(&sc->sc_txfreeq, txs_q); SIMPLEQ_REMOVE_HEAD(&sc->sc_txfreeq, txs_q);
SIMPLEQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q); SIMPLEQ_INSERT_TAIL(&sc->sc_txdirtyq, txs, txs_q);
last_txs = txs;
} }
if (sc->sc_txfree != ofree) { if (sc->sc_txfree != ofree) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: bwi.c,v 1.22 2012/04/25 05:14:05 nakayama Exp $ */ /* $NetBSD: bwi.c,v 1.23 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */ /* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */
/* /*
@ -48,7 +48,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.22 2012/04/25 05:14:05 nakayama Exp $"); __KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.23 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/callout.h> #include <sys/callout.h>
@ -5320,7 +5320,7 @@ bwi_rf_calc_nrssi_slope_11b(struct bwi_mac *mac)
struct bwi_phy *phy = &mac->mac_phy; struct bwi_phy *phy = &mac->mac_phy;
uint16_t save_rf[SAVE_RF_MAX]; uint16_t save_rf[SAVE_RF_MAX];
uint16_t save_phy[SAVE_PHY_MAX]; uint16_t save_phy[SAVE_PHY_MAX];
uint16_t ant_div, bbp_atten, chan_ex; uint16_t ant_div, chan_ex;
int16_t nrssi[2]; int16_t nrssi[2];
int i; int i;
@ -5333,7 +5333,7 @@ bwi_rf_calc_nrssi_slope_11b(struct bwi_mac *mac)
save_phy[i] = PHY_READ(mac, save_phy_regs[i]); save_phy[i] = PHY_READ(mac, save_phy_regs[i]);
ant_div = CSR_READ_2(sc, BWI_RF_ANTDIV); ant_div = CSR_READ_2(sc, BWI_RF_ANTDIV);
bbp_atten = CSR_READ_2(sc, BWI_BBP_ATTEN); (void)CSR_READ_2(sc, BWI_BBP_ATTEN);
chan_ex = CSR_READ_2(sc, BWI_RF_CHAN_EX); chan_ex = CSR_READ_2(sc, BWI_RF_CHAN_EX);
/* /*
@ -9338,13 +9338,13 @@ bwi_txeof(struct bwi_softc *sc)
struct ifnet *ifp = &sc->sc_if; struct ifnet *ifp = &sc->sc_if;
for (;;) { for (;;) {
uint32_t tx_status0, tx_status1; uint32_t tx_status0;
uint16_t tx_id, tx_info; uint16_t tx_id, tx_info;
tx_status0 = CSR_READ_4(sc, BWI_TXSTATUS_0); tx_status0 = CSR_READ_4(sc, BWI_TXSTATUS_0);
if ((tx_status0 & BWI_TXSTATUS_0_MORE) == 0) if ((tx_status0 & BWI_TXSTATUS_0_MORE) == 0)
break; break;
tx_status1 = CSR_READ_4(sc, BWI_TXSTATUS_1); (void)CSR_READ_4(sc, BWI_TXSTATUS_1);
tx_id = __SHIFTOUT(tx_status0, BWI_TXSTATUS_0_TXID_MASK); tx_id = __SHIFTOUT(tx_status0, BWI_TXSTATUS_0_TXID_MASK);
tx_info = BWI_TXSTATUS_0_INFO(tx_status0); tx_info = BWI_TXSTATUS_0_INFO(tx_status0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ciss.c,v 1.31 2013/10/13 04:24:21 christos Exp $ */ /* $NetBSD: ciss.c,v 1.32 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */
/* /*
@ -19,7 +19,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.31 2013/10/13 04:24:21 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.32 2013/10/17 21:24:24 christos Exp $");
#include "bio.h" #include "bio.h"
@ -1067,7 +1067,6 @@ ciss_scsi_cmd(struct scsipi_channel *chan, scsipi_adapter_req_t req,
u_int8_t target; u_int8_t target;
struct ciss_ccb *ccb; struct ciss_ccb *ccb;
struct ciss_cmd *cmd; struct ciss_cmd *cmd;
int error;
CISS_DPRINTF(CISS_D_CMD, ("ciss_scsi_cmd ")); CISS_DPRINTF(CISS_D_CMD, ("ciss_scsi_cmd "));
@ -1087,7 +1086,6 @@ ciss_scsi_cmd(struct scsipi_channel *chan, scsipi_adapter_req_t req,
break; break;
} }
error = 0;
xs->error = XS_NOERROR; xs->error = XS_NOERROR;
/* XXX emulate SYNCHRONIZE_CACHE ??? */ /* XXX emulate SYNCHRONIZE_CACHE ??? */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfi.c,v 1.49 2013/06/28 14:46:44 christos Exp $ */ /* $NetBSD: mfi.c,v 1.50 2013/10/17 21:24:24 christos Exp $ */
/* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
/* /*
@ -73,7 +73,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.49 2013/06/28 14:46:44 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.50 2013/10/17 21:24:24 christos Exp $");
#include "bio.h" #include "bio.h"
@ -2340,7 +2340,6 @@ mfi_ioctl_setstate(struct mfi_softc *sc, struct bioc_setstate *bs)
struct mfi_pd_list *pd; struct mfi_pd_list *pd;
int i, found, rv = EINVAL; int i, found, rv = EINVAL;
uint8_t mbox[MFI_MBOX_SIZE]; uint8_t mbox[MFI_MBOX_SIZE];
uint32_t cmd;
DNPRINTF(MFI_D_IOCTL, "%s: mfi_ioctl_setstate %x\n", DEVNAME(sc), DNPRINTF(MFI_D_IOCTL, "%s: mfi_ioctl_setstate %x\n", DEVNAME(sc),
bs->bs_status); bs->bs_status);
@ -2368,21 +2367,17 @@ mfi_ioctl_setstate(struct mfi_softc *sc, struct bioc_setstate *bs)
switch (bs->bs_status) { switch (bs->bs_status) {
case BIOC_SSONLINE: case BIOC_SSONLINE:
mbox[2] = MFI_PD_ONLINE; mbox[2] = MFI_PD_ONLINE;
cmd = MD_DCMD_PD_SET_STATE;
break; break;
case BIOC_SSOFFLINE: case BIOC_SSOFFLINE:
mbox[2] = MFI_PD_OFFLINE; mbox[2] = MFI_PD_OFFLINE;
cmd = MD_DCMD_PD_SET_STATE;
break; break;
case BIOC_SSHOTSPARE: case BIOC_SSHOTSPARE:
mbox[2] = MFI_PD_HOTSPARE; mbox[2] = MFI_PD_HOTSPARE;
cmd = MD_DCMD_PD_SET_STATE;
break; break;
/* /*
case BIOC_SSREBUILD: case BIOC_SSREBUILD:
cmd = MD_DCMD_PD_REBUILD;
break; break;
*/ */
default: default:
@ -3501,9 +3496,6 @@ mfifopen(dev_t dev, int flag, int mode, struct lwp *l)
static int static int
mfifclose(dev_t dev, int flag, int mode, struct lwp *l) mfifclose(dev_t dev, int flag, int mode, struct lwp *l)
{ {
struct mfi_softc *sc;
sc = device_lookup_private(&mfi_cd, minor(dev));
return (0); return (0);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: mtd803.c,v 1.27 2012/10/27 17:18:22 chs Exp $ */ /* $NetBSD: mtd803.c,v 1.28 2013/10/17 21:24:24 christos Exp $ */
/*- /*-
* *
@ -44,7 +44,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.27 2012/10/27 17:18:22 chs Exp $"); __KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.28 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -460,7 +460,6 @@ mtd_start(struct ifnet *ifp)
{ {
struct mtd_softc *sc = ifp->if_softc; struct mtd_softc *sc = ifp->if_softc;
struct mbuf *m; struct mbuf *m;
int len;
int first_tx = sc->cur_tx; int first_tx = sc->cur_tx;
/* Don't transmit when the interface is busy or inactive */ /* Don't transmit when the interface is busy or inactive */
@ -476,7 +475,7 @@ mtd_start(struct ifnet *ifp)
bpf_mtap(ifp, m); bpf_mtap(ifp, m);
/* Copy mbuf chain into tx buffer */ /* Copy mbuf chain into tx buffer */
len = mtd_put(sc, sc->cur_tx, m); (void)mtd_put(sc, sc->cur_tx, m);
if (sc->cur_tx != first_tx) if (sc->cur_tx != first_tx)
sc->desc[MTD_NUM_RXD + sc->cur_tx].stat = MTD_TXD_OWNER; sc->desc[MTD_NUM_RXD + sc->cur_tx].stat = MTD_TXD_OWNER;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtw.c,v 1.119 2011/07/04 16:06:17 joerg Exp $ */ /* $NetBSD: rtw.c,v 1.120 2013/10/17 21:24:24 christos Exp $ */
/*- /*-
* Copyright (c) 2004, 2005, 2006, 2007 David Young. All rights * Copyright (c) 2004, 2005, 2006, 2007 David Young. All rights
* reserved. * reserved.
@ -32,7 +32,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.119 2011/07/04 16:06:17 joerg Exp $"); __KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.120 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -830,7 +830,6 @@ rtw_srom_parse(struct rtw_srom *sr, uint32_t *flags, uint8_t *cs_threshold,
const char *rfname, *paname; const char *rfname, *paname;
char scratch[sizeof("unknown 0xXX")]; char scratch[sizeof("unknown 0xXX")];
uint16_t srom_version; uint16_t srom_version;
uint8_t mac[IEEE80211_ADDR_LEN];
*flags &= ~(RTW_F_DIGPHY|RTW_F_DFLANTB|RTW_F_ANTDIV); *flags &= ~(RTW_F_DIGPHY|RTW_F_DFLANTB|RTW_F_ANTDIV);
*rcr &= ~(RTW_RCR_ENCS1 | RTW_RCR_ENCS2); *rcr &= ~(RTW_RCR_ENCS1 | RTW_RCR_ENCS2);
@ -849,8 +848,10 @@ rtw_srom_parse(struct rtw_srom *sr, uint32_t *flags, uint8_t *cs_threshold,
srom_version >> 8, srom_version & 0xff); srom_version >> 8, srom_version & 0xff);
} }
uint8_t mac[IEEE80211_ADDR_LEN];
for (i = 0; i < IEEE80211_ADDR_LEN; i++) for (i = 0; i < IEEE80211_ADDR_LEN; i++)
mac[i] = RTW_SR_GET(sr, RTW_SR_MAC + i); mac[i] = RTW_SR_GET(sr, RTW_SR_MAC + i);
__USE(mac);
RTW_DPRINTF(RTW_DEBUG_ATTACH, RTW_DPRINTF(RTW_DEBUG_ATTACH,
("%s: EEPROM MAC %s\n", device_xname(dev), ether_sprintf(mac))); ("%s: EEPROM MAC %s\n", device_xname(dev), ether_sprintf(mac)));
@ -1054,9 +1055,13 @@ rtw_set_rfprog(struct rtw_regs *regs, enum rtw_rfchipid rfchipid,
RTW_WBR(regs, RTW_CONFIG4, RTW_CONFIG4); RTW_WBR(regs, RTW_CONFIG4, RTW_CONFIG4);
#ifdef RTW_DEBUG
RTW_DPRINTF(RTW_DEBUG_INIT, RTW_DPRINTF(RTW_DEBUG_INIT,
("%s: %s RF programming method, %#02x\n", device_xname(dev), method, ("%s: %s RF programming method, %#02x\n", device_xname(dev), method,
RTW_READ8(regs, RTW_CONFIG4))); RTW_READ8(regs, RTW_CONFIG4)));
#else
__USE(method);
#endif
} }
static inline void static inline void
@ -1375,12 +1380,17 @@ rtw_rxdesc_init(struct rtw_rxdesc_blk *rdb, struct rtw_rxsoft *rs,
octl = rd->rd_ctl; octl = rd->rd_ctl;
rd->rd_ctl = htole32(ctl); rd->rd_ctl = htole32(ctl);
#ifdef RTW_DEBUG
RTW_DPRINTF( RTW_DPRINTF(
kick ? (RTW_DEBUG_RECV_DESC | RTW_DEBUG_IO_KICK) kick ? (RTW_DEBUG_RECV_DESC | RTW_DEBUG_IO_KICK)
: RTW_DEBUG_RECV_DESC, : RTW_DEBUG_RECV_DESC,
("%s: rd %p buf %08x -> %08x ctl %08x -> %08x\n", __func__, rd, ("%s: rd %p buf %08x -> %08x ctl %08x -> %08x\n", __func__, rd,
le32toh(obuf), le32toh(rd->rd_buf), le32toh(octl), le32toh(obuf), le32toh(rd->rd_buf), le32toh(octl),
le32toh(rd->rd_ctl))); le32toh(rd->rd_ctl)));
#else
__USE(octl);
__USE(obuf);
#endif
/* sync the descriptor */ /* sync the descriptor */
bus_dmamap_sync(rdb->rdb_dmat, rdb->rdb_dmamap, bus_dmamap_sync(rdb->rdb_dmat, rdb->rdb_dmamap,
@ -1392,11 +1402,9 @@ static void
rtw_rxdesc_init_all(struct rtw_rxdesc_blk *rdb, struct rtw_rxsoft *ctl, int kick) rtw_rxdesc_init_all(struct rtw_rxdesc_blk *rdb, struct rtw_rxsoft *ctl, int kick)
{ {
int i; int i;
struct rtw_rxdesc *rd;
struct rtw_rxsoft *rs; struct rtw_rxsoft *rs;
for (i = 0; i < rdb->rdb_ndesc; i++) { for (i = 0; i < rdb->rdb_ndesc; i++) {
rd = &rdb->rdb_desc[i];
rs = &ctl[i]; rs = &ctl[i];
rtw_rxdesc_init(rdb, rs, i, kick); rtw_rxdesc_init(rdb, rs, i, kick);
} }
@ -1730,10 +1738,14 @@ rtw_collect_txpkt(struct rtw_softc *sc, struct rtw_txdesc_blk *tdb,
condstring = "error"; condstring = "error";
} }
#ifdef RTW_DEBUG
DPRINTF(sc, RTW_DEBUG_XMIT_DESC, DPRINTF(sc, RTW_DEBUG_XMIT_DESC,
("%s: ts %p txdesc[%d, %d] %s tries rts %u data %u\n", ("%s: ts %p txdesc[%d, %d] %s tries rts %u data %u\n",
device_xname(sc->sc_dev), ts, ts->ts_first, ts->ts_last, device_xname(sc->sc_dev), ts, ts->ts_first, ts->ts_last,
condstring, rts_retry, data_retry)); condstring, rts_retry, data_retry));
#else
__USE(condstring);
#endif
} }
static void static void
@ -1864,11 +1876,17 @@ rtw_intr_beacon(struct rtw_softc *sc, uint16_t isr)
if ((isr & (RTW_INTR_TBDOK|RTW_INTR_TBDER)) != 0) { if ((isr & (RTW_INTR_TBDOK|RTW_INTR_TBDER)) != 0) {
next = rtw_txring_next(&sc->sc_regs, tdb); next = rtw_txring_next(&sc->sc_regs, tdb);
#ifdef RTW_DEBUG
RTW_DPRINTF(RTW_DEBUG_BEACON, RTW_DPRINTF(RTW_DEBUG_BEACON,
("%s: beacon ring %sprocessed, isr = %#04" PRIx16 ("%s: beacon ring %sprocessed, isr = %#04" PRIx16
", next %u expected %u, %" PRIu64 "\n", __func__, ", next %u expected %u, %" PRIu64 "\n", __func__,
(next == tdb->tdb_next) ? "" : "un", isr, next, (next == tdb->tdb_next) ? "" : "un", isr, next,
tdb->tdb_next, (uint64_t)tsfth << 32 | tsftl)); tdb->tdb_next, (uint64_t)tsfth << 32 | tsftl));
#else
__USE(next);
__USE(tsfth);
__USE(tsftl);
#endif
if ((RTW_READ8(&sc->sc_regs, RTW_TPPOLL) & RTW_TPPOLL_BQ) == 0) if ((RTW_READ8(&sc->sc_regs, RTW_TPPOLL) & RTW_TPPOLL_BQ) == 0)
rtw_collect_txring(sc, tsb, tdb, 1); rtw_collect_txring(sc, tsb, tdb, 1);
} }
@ -2104,9 +2122,13 @@ rtw_resume_ticks(struct rtw_softc *sc)
sc->sc_do_tick = 1; sc->sc_do_tick = 1;
#ifdef RTW_DEBUG
RTW_DPRINTF(RTW_DEBUG_TIMEOUT, RTW_DPRINTF(RTW_DEBUG_TIMEOUT,
("%s: resume ticks delta %#08x now %#08x next %#08x\n", ("%s: resume ticks delta %#08x now %#08x next %#08x\n",
device_xname(sc->sc_dev), tsftrl1 - tsftrl0, tsftrl1, next_tint)); device_xname(sc->sc_dev), tsftrl1 - tsftrl0, tsftrl1, next_tint));
#else
__USE(tsftrl0);
#endif
} }
static void static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: sl811hs.c,v 1.46 2013/10/04 21:10:18 joerg Exp $ */ /* $NetBSD: sl811hs.c,v 1.47 2013/10/17 21:24:24 christos Exp $ */
/* /*
* Not (c) 2007 Matthew Orgass * Not (c) 2007 Matthew Orgass
@ -68,7 +68,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.46 2013/10/04 21:10:18 joerg Exp $"); __KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47 2013/10/17 21:24:24 christos Exp $");
#include "opt_slhci.h" #include "opt_slhci.h"
@ -1365,11 +1365,9 @@ slhci_close(struct usbd_pipe *pipe)
{ {
struct slhci_softc *sc; struct slhci_softc *sc;
struct slhci_pipe *spipe; struct slhci_pipe *spipe;
struct slhci_transfers *t;
sc = pipe->device->bus->hci_private; sc = pipe->device->bus->hci_private;
spipe = (struct slhci_pipe *)pipe; spipe = (struct slhci_pipe *)pipe;
t = &sc->sc_transfers;
DLOG(D_TRACE, "%s close spipe %p spipe->xfer %p", DLOG(D_TRACE, "%s close spipe %p spipe->xfer %p",
pnames(spipe->ptype), spipe, spipe->xfer, 0); pnames(spipe->ptype), spipe, spipe->xfer, 0);
@ -1597,7 +1595,7 @@ waitcheck:
#define BSB(a, b, c, d, e) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_ # e) #define BSB(a, b, c, d, e) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_ # e)
#define BSB_SYNC(a, b, c, d) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_SYNC) #define BSB_SYNC(a, b, c, d) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_SYNC)
#else /* now !SLHCI_BUS_SPACE_BARRIERS */ #else /* now !SLHCI_BUS_SPACE_BARRIERS */
#define BSB(a, b, c, d, e) #define BSB(a, b, c, d, e) __USE(d)
#define BSB_SYNC(a, b, c, d) #define BSB_SYNC(a, b, c, d)
#endif /* SLHCI_BUS_SPACE_BARRIERS */ #endif /* SLHCI_BUS_SPACE_BARRIERS */
@ -2621,10 +2619,8 @@ static usbd_status
slhci_close_pipe(struct slhci_softc *sc, struct slhci_pipe *spipe, struct slhci_close_pipe(struct slhci_softc *sc, struct slhci_pipe *spipe, struct
usbd_xfer *xfer) usbd_xfer *xfer)
{ {
struct slhci_transfers *t;
struct usbd_pipe *pipe; struct usbd_pipe *pipe;
t = &sc->sc_transfers;
pipe = &spipe->pipe; pipe = &spipe->pipe;
if (pipe->interval && spipe->ptype != PT_ROOT_INTR) if (pipe->interval && spipe->ptype != PT_ROOT_INTR)

View File

@ -1,4 +1,4 @@
/* $NetBSD: spic.c,v 1.18 2010/04/21 21:49:53 dyoung Exp $ */ /* $NetBSD: spic.c,v 1.19 2013/10/17 21:24:24 christos Exp $ */
/* /*
* Copyright (c) 2002 The NetBSD Foundation, Inc. * Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -49,7 +49,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.18 2010/04/21 21:49:53 dyoung Exp $"); __KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.19 2013/10/17 21:24:24 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -113,11 +113,11 @@ static const struct wsmouse_accessops spic_accessops = {
static u_int8_t static u_int8_t
spic_call1(struct spic_softc *sc, u_int8_t dev) spic_call1(struct spic_softc *sc, u_int8_t dev)
{ {
u_int8_t v1, v2; u_int8_t v2;
SPIC_COMMAND(0, INB(sc, SPIC_PORT2) & 2); SPIC_COMMAND(0, INB(sc, SPIC_PORT2) & 2);
OUTB(sc, dev, SPIC_PORT2); OUTB(sc, dev, SPIC_PORT2);
v1 = INB(sc, SPIC_PORT2); (void)INB(sc, SPIC_PORT2);
v2 = INB(sc, SPIC_PORT1); v2 = INB(sc, SPIC_PORT1);
return v2; return v2;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: tpm.c,v 1.8 2013/09/14 13:09:55 joerg Exp $ */ /* $NetBSD: tpm.c,v 1.9 2013/10/17 21:24:24 christos Exp $ */
/* /*
* Copyright (c) 2008, 2009 Michael Shalayeff * Copyright (c) 2008, 2009 Michael Shalayeff
* Copyright (c) 2009, 2010 Hans-Jörg Höxer * Copyright (c) 2009, 2010 Hans-Jörg Höxer
@ -18,7 +18,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.8 2013/09/14 13:09:55 joerg Exp $"); __KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.9 2013/10/17 21:24:24 christos Exp $");
#if 0 #if 0
#define TPM_DEBUG #define TPM_DEBUG
@ -855,7 +855,6 @@ int
tpm_legacy_init(struct tpm_softc *sc, int irq, const char *name) tpm_legacy_init(struct tpm_softc *sc, int irq, const char *name)
{ {
char id[8]; char id[8];
uint8_t ioh, iol;
int i; int i;
if ((i = bus_space_map(sc->sc_batm, tpm_enabled, 2, 0, &sc->sc_bahm))) { if ((i = bus_space_map(sc->sc_batm, tpm_enabled, 2, 0, &sc->sc_bahm))) {
@ -870,8 +869,6 @@ tpm_legacy_init(struct tpm_softc *sc, int irq, const char *name)
aprint_debug_dev(sc->sc_dev, "%.4s %d.%d @0x%x\n", &id[4], id[0], aprint_debug_dev(sc->sc_dev, "%.4s %d.%d @0x%x\n", &id[4], id[0],
id[1], tpm_enabled); id[1], tpm_enabled);
iol = tpm_enabled & 0xff;
ioh = tpm_enabled >> 16;
tpm_enabled = 0; tpm_enabled = 0;
return 0; return 0;