Lines Matching defs:link
88 static void qlogic_release(struct pcmcia_device *link);
90 static int qlogic_config(struct pcmcia_device * link);
93 struct pcmcia_device *link, int qbase, int qlirq)
147 static int qlogic_probe(struct pcmcia_device *link)
151 dev_dbg(&link->dev, "qlogic_attach()\n");
157 info->p_dev = link;
158 link->priv = info;
159 link->resource[0]->end = 16;
160 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
161 link->conf.Attributes = CONF_ENABLE_IRQ;
162 link->conf.IntType = INT_MEMORY_AND_IO;
163 link->conf.Present = PRESENT_OPTION;
165 return qlogic_config(link);
170 static void qlogic_detach(struct pcmcia_device *link)
172 dev_dbg(&link->dev, "qlogic_detach\n");
174 qlogic_release(link);
175 kfree(link->priv);
197 static int qlogic_config(struct pcmcia_device * link)
199 scsi_info_t *info = link->priv;
203 dev_dbg(&link->dev, "qlogic_config\n");
205 ret = pcmcia_loop_config(link, qlogic_config_check, NULL);
209 if (!link->irq)
212 ret = pcmcia_request_configuration(link, &link->conf);
218 outb(0xb4, link->resource[0]->start + 0xd);
219 outb(0x24, link->resource[0]->start + 0x9);
220 outb(0x04, link->resource[0]->start + 0xd);
224 if (resource_size(link->resource[0]) == 32)
225 host = qlogic_detect(&qlogicfas_driver_template, link,
226 link->resource[0]->start + 16, link->irq);
228 host = qlogic_detect(&qlogicfas_driver_template, link,
229 link->resource[0]->start, link->irq);
241 pcmcia_disable_device(link);
247 static void qlogic_release(struct pcmcia_device *link)
249 scsi_info_t *info = link->priv;
251 dev_dbg(&link->dev, "qlogic_release\n");
255 free_irq(link->irq, info->host);
256 pcmcia_disable_device(link);
263 static int qlogic_resume(struct pcmcia_device *link)
265 scsi_info_t *info = link->priv;
267 pcmcia_request_configuration(link, &link->conf);
271 outb(0x80, link->resource[0]->start + 0xd);
272 outb(0x24, link->resource[0]->start + 0x9);
273 outb(0x04, link->resource[0]->start + 0xd);