Home
last modified time | relevance | path

Searched refs:sc (Results 1 – 25 of 88) sorted by relevance

1234

/drivers/net/wan/lmc/
Dlmc_media.c158 lmc_dummy_set_1 (lmc_softc_t * const sc, int a) in lmc_dummy_set_1() argument
163 lmc_dummy_set2_1 (lmc_softc_t * const sc, lmc_ctl_t * a) in lmc_dummy_set2_1() argument
172 lmc_hssi_init (lmc_softc_t * const sc) in lmc_hssi_init() argument
174 sc->ictl.cardtype = LMC_CTL_CARDTYPE_LMC5200; in lmc_hssi_init()
176 lmc_gpio_mkoutput (sc, LMC_GEP_HSSI_CLOCK); in lmc_hssi_init()
180 lmc_hssi_default (lmc_softc_t * const sc) in lmc_hssi_default() argument
182 sc->lmc_miireg16 = LMC_MII16_LED_ALL; in lmc_hssi_default()
184 sc->lmc_media->set_link_status (sc, LMC_LINK_DOWN); in lmc_hssi_default()
185 sc->lmc_media->set_clock_source (sc, LMC_CTL_CLOCK_SOURCE_EXT); in lmc_hssi_default()
186 sc->lmc_media->set_crc_length (sc, LMC_CTL_CRC_LENGTH_16); in lmc_hssi_default()
[all …]
Dlmc_main.c98 static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size);
103 static void lmc_reset(lmc_softc_t * const sc);
104 static void lmc_dec_reset(lmc_softc_t * const sc);
113 lmc_softc_t *sc = dev_to_sc(dev); in lmc_ioctl() local
132 if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof(lmc_ctl_t))) in lmc_ioctl()
154 spin_lock_irqsave(&sc->lmc_lock, flags); in lmc_ioctl()
155 sc->lmc_media->set_status (sc, &ctl); in lmc_ioctl()
157 if(ctl.crc_length != sc->ictl.crc_length) { in lmc_ioctl()
158 sc->lmc_media->set_crc_length(sc, ctl.crc_length); in lmc_ioctl()
159 if (sc->ictl.crc_length == LMC_CTL_CRC_LENGTH_16) in lmc_ioctl()
[all …]
Dlmc_proto.c51 void lmc_proto_attach(lmc_softc_t *sc) /*FOLD00*/ in lmc_proto_attach() argument
53 lmc_trace(sc->lmc_device, "lmc_proto_attach in"); in lmc_proto_attach()
54 switch(sc->if_type){ in lmc_proto_attach()
57 struct net_device *dev = sc->lmc_device; in lmc_proto_attach()
63 struct net_device *dev = sc->lmc_device; in lmc_proto_attach()
78 lmc_trace(sc->lmc_device, "lmc_proto_attach out"); in lmc_proto_attach()
81 int lmc_proto_ioctl(lmc_softc_t *sc, struct ifreq *ifr, int cmd) in lmc_proto_ioctl() argument
83 lmc_trace(sc->lmc_device, "lmc_proto_ioctl"); in lmc_proto_ioctl()
84 if (sc->if_type == LMC_PPP) in lmc_proto_ioctl()
85 return hdlc_ioctl(sc->lmc_device, ifr, cmd); in lmc_proto_ioctl()
[all …]
Dlmc_proto.h6 void lmc_proto_attach(lmc_softc_t *sc);
7 int lmc_proto_ioctl(lmc_softc_t *sc, struct ifreq *ifr, int cmd);
8 int lmc_proto_open(lmc_softc_t *sc);
9 void lmc_proto_close(lmc_softc_t *sc);
10 __be16 lmc_proto_type(lmc_softc_t *sc, struct sk_buff *skb);
11 void lmc_proto_netif(lmc_softc_t *sc, struct sk_buff *skb);
/drivers/net/wireless/ath9k/
Dmain.c41 static void ath_detach(struct ath_softc *sc);
45 static void bus_read_cachesize(struct ath_softc *sc, int *csz) in bus_read_cachesize() argument
49 pci_read_config_byte(sc->pdev, PCI_CACHE_LINE_SIZE, (u8 *)&u8tmp); in bus_read_cachesize()
62 static void ath_setcurmode(struct ath_softc *sc, enum wireless_mode mode) in ath_setcurmode() argument
64 sc->cur_rate_table = sc->hw_rate_table[mode]; in ath_setcurmode()
70 sc->sc_protrix = (mode == ATH9K_MODE_11G ? 1 : 0); in ath_setcurmode()
99 static void ath_update_txpow(struct ath_softc *sc) in ath_update_txpow() argument
101 struct ath_hal *ah = sc->sc_ah; in ath_update_txpow()
104 if (sc->sc_curtxpow != sc->sc_config.txpowlimit) { in ath_update_txpow()
105 ath9k_hw_set_txpowerlimit(ah, sc->sc_config.txpowlimit); in ath_update_txpow()
[all …]
Dbeacon.c24 static int ath_beaconq_config(struct ath_softc *sc) in ath_beaconq_config() argument
26 struct ath_hal *ah = sc->sc_ah; in ath_beaconq_config()
29 ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi); in ath_beaconq_config()
30 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) { in ath_beaconq_config()
37 qi.tqi_aifs = sc->beacon.beacon_qi.tqi_aifs; in ath_beaconq_config()
38 qi.tqi_cwmin = 2*sc->beacon.beacon_qi.tqi_cwmin; in ath_beaconq_config()
39 qi.tqi_cwmax = sc->beacon.beacon_qi.tqi_cwmax; in ath_beaconq_config()
42 if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { in ath_beaconq_config()
43 DPRINTF(sc, ATH_DBG_FATAL, in ath_beaconq_config()
47 ath9k_hw_resettxqueue(ah, sc->beacon.beaconq); /* push to h/w */ in ath_beaconq_config()
[all …]
Drecv.c27 static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) in ath_rx_buf_link() argument
29 struct ath_hal *ah = sc->sc_ah; in ath_rx_buf_link()
48 sc->rx.bufsize, in ath_rx_buf_link()
51 if (sc->rx.rxlink == NULL) in ath_rx_buf_link()
54 *sc->rx.rxlink = bf->bf_daddr; in ath_rx_buf_link()
56 sc->rx.rxlink = &ds->ds_link; in ath_rx_buf_link()
60 static void ath_setdefantenna(struct ath_softc *sc, u32 antenna) in ath_setdefantenna() argument
63 ath9k_hw_setantenna(sc->sc_ah, antenna); in ath_setdefantenna()
64 sc->rx.defant = antenna; in ath_setdefantenna()
65 sc->rx.rxotherant = 0; in ath_setdefantenna()
[all …]
Dxmit.c64 static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, in ath_tx_txqaddbuf() argument
67 struct ath_hal *ah = sc->sc_ah; in ath_tx_txqaddbuf()
85 DPRINTF(sc, ATH_DBG_QUEUE, in ath_tx_txqaddbuf()
90 DPRINTF(sc, ATH_DBG_XMIT, in ath_tx_txqaddbuf()
95 DPRINTF(sc, ATH_DBG_XMIT, "link[%u] (%p)=%llx (%p)\n", in ath_tx_txqaddbuf()
103 static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, in ath_tx_complete() argument
106 struct ieee80211_hw *hw = sc->hw; in ath_tx_complete()
111 DPRINTF(sc, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb); in ath_tx_complete()
147 static int ath_aggr_query(struct ath_softc *sc, struct ath_node *an, u8 tidno) in ath_aggr_query() argument
159 static void ath_get_beaconconfig(struct ath_softc *sc, int if_id, in ath_get_beaconconfig() argument
[all …]
Ddebug.c24 void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...) in DPRINTF() argument
26 if (!sc) in DPRINTF()
29 if (sc->sc_debug.debug_mask & dbg_mask) { in DPRINTF()
48 struct ath_softc *sc = file->private_data; in read_file_dma() local
49 struct ath_hal *ah = sc->sc_ah; in read_file_dma()
132 void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) in ath_debug_stat_interrupt() argument
135 sc->sc_debug.stats.istats.total++; in ath_debug_stat_interrupt()
137 sc->sc_debug.stats.istats.rxok++; in ath_debug_stat_interrupt()
139 sc->sc_debug.stats.istats.rxeol++; in ath_debug_stat_interrupt()
141 sc->sc_debug.stats.istats.rxorn++; in ath_debug_stat_interrupt()
[all …]
Dcore.h64 #define ATH_TXQ_SETUP(sc, i) ((sc)->tx.txqsetup & (1<<i)) argument
147 void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...);
148 int ath9k_init_debug(struct ath_softc *sc);
149 void ath9k_exit_debug(struct ath_softc *sc);
150 void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
154 static inline void DPRINTF(struct ath_softc *sc, int dbg_mask, in DPRINTF() argument
159 static inline int ath9k_init_debug(struct ath_softc *sc) in ath9k_init_debug() argument
164 static inline void ath9k_exit_debug(struct ath_softc *sc) in ath9k_exit_debug() argument
168 static inline void ath_debug_stat_interrupt(struct ath_softc *sc, in ath_debug_stat_interrupt() argument
283 int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
[all …]
Drc.c636 static u8 ath_rc_ratefind_ht(struct ath_softc *sc, in ath_rc_ratefind_ht() argument
781 static u8 ath_rc_rate_getidx(struct ath_softc *sc, in ath_rc_rate_getidx() argument
810 static void ath_rc_ratefind(struct ath_softc *sc, in ath_rc_ratefind() argument
820 rate_table = sc->cur_rate_table; in ath_rc_ratefind()
821 rix = ath_rc_ratefind_ht(sc, ath_rc_priv, rate_table, 1, in ath_rc_ratefind()
835 nrix = ath_rc_rate_getidx(sc, in ath_rc_ratefind()
855 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, in ath_rc_ratefind()
877 if ((sc->hw->conf.channel->band == IEEE80211_BAND_2GHZ) && in ath_rc_ratefind()
878 (sc->hw->conf.ht.enabled)) { in ath_rc_ratefind()
890 static bool ath_rc_update_per(struct ath_softc *sc, in ath_rc_update_per() argument
[all …]
/drivers/net/wireless/ath5k/
Dbase.c217 static int ath5k_reset(struct ath5k_softc *sc, bool stop, bool change_channel);
218 static int ath5k_reset_wake(struct ath5k_softc *sc);
243 static int ath5k_beacon_update(struct ath5k_softc *sc,
283 static int ath5k_chan_set(struct ath5k_softc *sc,
285 static void ath5k_setcurmode(struct ath5k_softc *sc,
287 static void ath5k_mode_setup(struct ath5k_softc *sc);
290 static int ath5k_desc_alloc(struct ath5k_softc *sc,
292 static void ath5k_desc_free(struct ath5k_softc *sc,
295 static int ath5k_rxbuf_setup(struct ath5k_softc *sc,
297 static int ath5k_txbuf_setup(struct ath5k_softc *sc,
[all …]
Ddebug.c161 struct ath5k_softc *sc = seq->private; in reg_show() local
164 ath5k_hw_reg_read(sc->ah, r->addr)); in reg_show()
201 struct ath5k_softc *sc = file->private_data; in read_file_tsf() local
204 (unsigned long long)ath5k_hw_get_tsf64(sc->ah)); in read_file_tsf()
212 struct ath5k_softc *sc = file->private_data; in write_file_tsf() local
219 ath5k_hw_reset_tsf(sc->ah); in write_file_tsf()
238 struct ath5k_softc *sc = file->private_data; in read_file_beacon() local
239 struct ath5k_hw *ah = sc->ah; in read_file_beacon()
245 v = ath5k_hw_reg_read(sc->ah, AR5K_BEACON); in read_file_beacon()
252 "AR5K_LAST_TSTP", ath5k_hw_reg_read(sc->ah, AR5K_LAST_TSTP)); in read_file_beacon()
[all …]
Ddebug.h143 ath5k_debug_init_device(struct ath5k_softc *sc);
149 ath5k_debug_finish_device(struct ath5k_softc *sc);
152 ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah);
155 ath5k_debug_dump_bands(struct ath5k_softc *sc);
158 ath5k_debug_dump_skb(struct ath5k_softc *sc,
162 ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf);
171 ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {} in ATH5K_DBG() argument
174 ATH5K_DBG_UNLIMIT(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) in ATH5K_DBG_UNLIMIT() argument
181 ath5k_debug_init_device(struct ath5k_softc *sc) {} in ath5k_debug_init_device() argument
187 ath5k_debug_finish_device(struct ath5k_softc *sc) {} in ath5k_debug_finish_device() argument
[all …]
Dattach.c105 struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) in ath5k_hw_attach() argument
108 struct pci_dev *pdev = sc->pdev; in ath5k_hw_attach()
117 ATH5K_ERR(sc, "out of memory\n"); in ath5k_hw_attach()
121 ah->ah_sc = sc; in ath5k_hw_attach()
122 ah->ah_iobase = sc->iobase; in ath5k_hw_attach()
254 ATH5K_ERR(sc, "Couldn't identify radio revision.\n"); in ath5k_hw_attach()
264 ATH5K_ERR(sc, "Device not yet supported.\n"); in ath5k_hw_attach()
308 ATH5K_ERR(sc, "unable to init EEPROM\n"); in ath5k_hw_attach()
315 ATH5K_ERR(sc, "unable to get device capabilities: 0x%04x\n", in ath5k_hw_attach()
316 sc->pdev->device); in ath5k_hw_attach()
/drivers/usb/atm/
Dueagle-atm.c296 #define IS_OPERATIONAL(sc) \ argument
297 ((UEA_CHIP_VERSION(sc) != EAGLE_IV) ? \
298 (GET_STATUS(sc->stats.phy.state) == 2) : \
299 (sc->stats.phy.state == 7))
558 #define uea_wait(sc, cond, timeo) \ argument
560 int _r = wait_event_interruptible_timeout(sc->sync_q, \
569 if (sc->usbatm->atm_dev) \
570 sc->usbatm->atm_dev->type = val; \
822 static int uea_idma_write(struct uea_softc *sc, const void *data, u32 size) in uea_idma_write() argument
830 uea_err(INS_TO_USBDEV(sc), "can't allocate xfer_buff\n"); in uea_idma_write()
[all …]
/drivers/block/
Dub.c356 static void ub_cleanup(struct ub_dev *sc);
358 static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
360 static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
362 static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
365 static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
367 static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
370 static void ub_scsi_dispatch(struct ub_dev *sc);
371 static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
372 static void ub_data_start(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
373 static void ub_state_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd, int rc);
[all …]
/drivers/md/
Ddm-stripe.c53 struct stripe_c *sc = container_of(work, struct stripe_c, kstriped_ws); in trigger_event() local
55 dm_table_event(sc->ti->table); in trigger_event()
75 static int get_stripe(struct dm_target *ti, struct stripe_c *sc, in get_stripe() argument
83 if (dm_get_device(ti, argv[0], start, sc->stripe_width, in get_stripe()
85 &sc->stripe[stripe].dev)) in get_stripe()
88 sc->stripe[stripe].physical_start = start; in get_stripe()
99 struct stripe_c *sc; in stripe_ctr() local
155 sc = alloc_context(stripes); in stripe_ctr()
156 if (!sc) { in stripe_ctr()
162 INIT_WORK(&sc->kstriped_ws, trigger_event); in stripe_ctr()
[all …]
/drivers/net/
Dsb1250-mac.c305 static int sbdma_add_rcvbuffer(struct sbmac_softc *sc, struct sbmacdma *d,
309 static void sbdma_fillring(struct sbmac_softc *sc, struct sbmacdma *d);
310 static int sbdma_rx_process(struct sbmac_softc *sc, struct sbmacdma *d,
312 static void sbdma_tx_process(struct sbmac_softc *sc, struct sbmacdma *d,
319 static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff);
323 static void sbmac_setmulti(struct sbmac_softc *sc);
457 struct sbmac_softc *sc = (struct sbmac_softc *)bus->priv; in sbmac_mii_read() local
458 void __iomem *sbm_mdio = sc->sbm_mdio; in sbmac_mii_read()
551 struct sbmac_softc *sc = (struct sbmac_softc *)bus->priv; in sbmac_mii_write() local
552 void __iomem *sbm_mdio = sc->sbm_mdio; in sbmac_mii_write()
[all …]
/drivers/scsi/
Dlibsrp.c185 static int srp_direct_data(struct scsi_cmnd *sc, struct srp_direct_buf *md, in srp_direct_data() argument
194 iue = (struct iu_entry *) sc->SCp.ptr; in srp_direct_data()
195 sg = scsi_sglist(sc); in srp_direct_data()
197 dprintk("%p %u %u %d\n", iue, scsi_bufflen(sc), in srp_direct_data()
198 md->len, scsi_sg_count(sc)); in srp_direct_data()
200 nsg = dma_map_sg(iue->target->dev, sg, scsi_sg_count(sc), in srp_direct_data()
203 printk("fail to map %p %d\n", iue, scsi_sg_count(sc)); in srp_direct_data()
206 len = min(scsi_bufflen(sc), md->len); in srp_direct_data()
210 err = rdma_io(sc, sg, nsg, md, 1, dir, len); in srp_direct_data()
218 static int srp_indirect_data(struct scsi_cmnd *sc, struct srp_cmd *cmd, in srp_indirect_data() argument
[all …]
Dlibiscsi.c152 struct scsi_cmnd *cmd = task->sc; in iscsi_prep_ecdb_ahs()
188 struct scsi_cmnd *sc = task->sc; in iscsi_prep_bidi_ahs() local
202 rlen_ahdr->read_length = cpu_to_be32(scsi_in(sc)->length); in iscsi_prep_bidi_ahs()
222 struct scsi_cmnd *sc = task->sc; in iscsi_prep_scsi_cmd_pdu() local
246 int_to_scsilun(sc->device->lun, (struct scsi_lun *)hdr->lun); in iscsi_prep_scsi_cmd_pdu()
251 cmd_len = sc->cmd_len; in iscsi_prep_scsi_cmd_pdu()
260 memcpy(hdr->cdb, sc->cmnd, cmd_len); in iscsi_prep_scsi_cmd_pdu()
263 if (scsi_bidi_cmnd(sc)) { in iscsi_prep_scsi_cmd_pdu()
269 if (sc->sc_data_direction == DMA_TO_DEVICE) { in iscsi_prep_scsi_cmd_pdu()
270 unsigned out_len = scsi_out(sc)->length; in iscsi_prep_scsi_cmd_pdu()
[all …]
/drivers/message/fusion/
Dmptscsih.c88 static void mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIOReque…
94 static void mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SC…
492 mptscsih_info_scsiio(MPT_ADAPTER *ioc, struct scsi_cmnd *sc, SCSIIOReply_t * pScsiReply) in mptscsih_info_scsiio() argument
594 scsi_print_command(sc); in mptscsih_info_scsiio()
598 "resid = %d\n", ioc->name, scsi_bufflen(sc), sc->underflow, in mptscsih_info_scsiio()
599 scsi_get_resid(sc)); in mptscsih_info_scsiio()
602 le32_to_cpu(pScsiReply->TransferCount), sc->result); in mptscsih_info_scsiio()
609 skey = sc->sense_buffer[2] & 0x0F; in mptscsih_info_scsiio()
610 asc = sc->sense_buffer[12]; in mptscsih_info_scsiio()
611 ascq = sc->sense_buffer[13]; in mptscsih_info_scsiio()
[all …]
/drivers/hid/
Dhid-sony.c36 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_report_fixup() local
38 if ((sc->quirks & VAIO_RDESC_CONSTANT) && in sony_report_fixup()
80 struct sony_sc *sc; in sony_probe() local
82 sc = kzalloc(sizeof(*sc), GFP_KERNEL); in sony_probe()
83 if (sc == NULL) { in sony_probe()
88 sc->quirks = quirks; in sony_probe()
89 hid_set_drvdata(hdev, sc); in sony_probe()
112 kfree(sc); in sony_probe()
/drivers/scsi/aic7xxx/
Daic7770.c278 struct seeprom_config *sc; in aha2840_load_seeprom() local
293 sc = ahc->seep_config; in aha2840_load_seeprom()
297 have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc, in aha2840_load_seeprom()
298 /*start_addr*/0, sizeof(*sc)/2); in aha2840_load_seeprom()
302 if (ahc_verify_cksum(sc) == 0) { in aha2840_load_seeprom()
329 target_settings = (sc->device_flags[i] & CFXFER) << 4; in aha2840_load_seeprom()
330 if (sc->device_flags[i] & CFSYNCH) in aha2840_load_seeprom()
332 if (sc->device_flags[i] & CFWIDEB) in aha2840_load_seeprom()
334 if (sc->device_flags[i] & CFDISC) in aha2840_load_seeprom()
341 ahc->our_id = sc->brtime_id & CFSCSIID; in aha2840_load_seeprom()
[all …]
/drivers/net/fs_enet/
Dfs_enet-main.c89 u16 pkt_len, sc; in fs_enet_rx_napi() local
101 while (((sc = CBDR_SC(bdp)) & BD_ENET_RX_EMPTY) == 0) { in fs_enet_rx_napi()
108 if ((sc & BD_ENET_RX_LAST) == 0) in fs_enet_rx_napi()
116 if (sc & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_CL | in fs_enet_rx_napi()
120 if (sc & (BD_ENET_RX_LG | BD_ENET_RX_SH)) in fs_enet_rx_napi()
123 if (sc & (BD_ENET_RX_NO | BD_ENET_RX_CL)) in fs_enet_rx_napi()
126 if (sc & BD_ENET_RX_CR) in fs_enet_rx_napi()
129 if (sc & BD_ENET_RX_OV) in fs_enet_rx_napi()
192 CBDW_SC(bdp, (sc & ~BD_ENET_RX_STATS) | BD_ENET_RX_EMPTY); in fs_enet_rx_napi()
197 if ((sc & BD_ENET_RX_WRAP) == 0) in fs_enet_rx_napi()
[all …]

1234